Operating principle:
1. Magnets include reed switch contact.
2. The reed switch turns on the transistor, the transistor turns on the coils.
3. Coils attract magnets.
4. Magnets move away from the reed switch, the transistor turns off the coils.
5. Spinning Top moves by inertia and the magnets again reach the reed switch.
Reed switch - https://aliexpress.com/item/10pcs-N-O-Reed-switch-Magnetic-Switch-2-14mm-Normally-Open-Magnetic-Induction-switch/32803902404.html
Magnets 10X3 mm - https://aliexpress.com/item/LEDERE-50Pcs-10mm-x-3mm-Strong-Round-Cylinder-Magnets-10X3-Rare-Earth-Neodymium-10-3/32915650136.html
transistor BD139 - https://aliexpress.com/item/Free-shipping-20-PCS-BD139-TO-126-NPN-power-transistors/592943346.html