Would magnets stop working if the earth stopped spinning?
No. The magnetic field on a magnet is not dependent on Earth’s magnetic field. The magnetic field in a magnet is product of the intrinsic nature of the particles forming the magnet. Also, it is not the rotation of the Earth which creates a magnetic field, it is the rotation of the nucleus. Since the nucleus is metallic, the rotation creates a magnetic field, in the same way as a solenoid creates a magnetic field if rotated. A compass would stop working if the nucleus stopped rotating, just as compasses do not work on Mars (a planet without magnetic field), but if you brought a magnet to Mars, it would still attract metallic objects.