It's either the motherboard or the hard disk.
If the "CD drive" is, in fact, a "DVD drive", try booting from a Linux disc you download or burn on another computer to have a look at the hard disk.
If that looks normal, boot from a Windows 10 install disk or from the recovery drive you made and try startup repair. What happens?
When I turn on the computer, it starts for a second and then stops. Before it stops, a screech is heard and from the CD drive. I unplugged the CD drive. Now there is no sound but still the pc does not start.
I checked the smps with a paper clip. It works perfectly. Could it be the motherboard? Help needed here. It's rainy season too. I hope it's the humidity.