The filament in the AMS has to be matched with the same type of filament that the model was sliced for.
For example. If the model was sliced for PLA, then only filament that is PLA will be available from the AMS. PETG/ABS/PLA-CF will be grayed out.

In Bambu studio, just add your filament that you want to print with. The location in Bambu Studio and the AMS do not have to match.

If you are using non Bambu filament then you need to input the type into the AMS manually as it has no way of knowing what you have loaded.

Click on the pencil icon in Bambu Studio or do it through the display interface on the printer.