Everything was working fine until one day the computer would shutdown a split second after the power button was pressed. All the fans would start spinning and lights would come up and then everything would go dark half a second later. After this happened clicking the power button had no effect. The only way to start again is to unplug the power cord and plug it again.
I suspected the power supply first, so I bought another one, but I faced the same issue. I unplugged everything and reseated the RAM/GPU and hard disk drives. After this the computer booted. I thought I was good to go, but then I noticed my secondary hard disk drive was no longer working.
It was not visible in the BIOS or windows. I replaced the hard disk drive with another one and after a while the original issue came back. So I reseated everything again and was able to boot back up, but to my horror the new hard disk drive was dead as well.
At this point I thought maybe something was shorting the system, so I took everything out including the motherboard from the case, and to my surprise there was a loose screw stuck between the back of the motherboard and the case. I removed this and put everything back together and now the powerdown issue doesn't happen, but I am not 100% sure the system is secure.
Is it possible that a screw causing a short can damage the HDDs? My OS drive was an SSD, and it is running fine. The ones that died are 1 TB regular hard disk drives.