Those are fine (and in fact one of my very favorite toys!). Magnets that are dangerous are those which can be swallowed and then stick together inside the body, puncturing internal tissues. Like these: https://www.amazon.com/216PCS-Magnetic-Sculpture-Magnet-FiveMM/dp/B0C62DSMN5/ref=sr_1_3_sspa?crid=1LWSLCS9VRVX0&keywords=magnet+ball+toy&qid=1685034130&s=toys-and-games&sprefix=magnet+ball+to%2Ctoys-and-games%2C202&sr=1-3-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzOE5OQzQ4M0ZLSlVYJmVuY3J5cHRlZElkPUEwNzM4NjY2MlU5RDFOSUJIMjY5VSZlbmNyeXB0ZWRBZElkPUEwNDU2NzIzMURVWlJKWUYwUUkyTiZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=