Pure magnetism does not harm the electronics!
There used to be a problem that the storage media of electronic devices could be influenced by magnets or were damaged or deleted.
Smartphones have experienced technical advances in all areas in recent years. Smartphone manufacturers are counteracting the impact of magnets on their devices and developing them to be more resistant than before.