Space the both parts far enough away if printed together to make sure the magnets don't accidentally jump out of the holes. (Shouldn't be the case if you have a magnetic build plate)
Absolutely make sure to stop the Print at 1mm height (right before the magnet holes would be closed.
In Bambu Studio right klick the layer preview bar on the right and add the pause there)
Insert the magnets the right way up so the box can stack.
The magnets should be facing eachother so they're attracted when you put a base and a lid next to eachother
All lids should have the same magnetism direction
All bases should have the same direction of magnet