Question PC/Windows randomly shuts down

carlos prosodio

Apr 16, 2017
so i switched computer but kept my GPU, RAM and HDD, it was all running fine was running games smoothly, but then i go to play another game and the PC just shuts down with no warning i was trying to find what was the problem and it happened some more times, it continues to shuts down but this time it shuts down like i shut it down normally in windows it just happens randomly, CPU and GPU isn't overheating neither is the PSU. this happened one time in the previous PC and when i turn it back on it said "hard drive failure imminent" but after that it worked fine sometimes the PC did not leave the bios logo but i restarted it and it started working.
i also did not do a fresh install of windows (don't know if this could be the problem).
i tested the RAM and it had no problems.
i really don't know why this is happening, i played for a couple of hours and nothing happened and then it just shuts down out of nowhere.
i would really appreciate if someone could help me with this problem.