How can I solve this question about which doesn't use an electromagnet?

The correct answer is "A compass".
The compass does not use any electromagnet to work it uses the magnetic field around the Earth to show the direction.
The school bell, speaker, and doorbell use an electromagnet to work as these devices are based on the principal of electromagnet.
Thus, option D is correct.