The specs are incomplete. No mention of age as well as PSU specs.
This sort of PC is a common sight at shop counters and the usual fixes if the OS reload doesn't clear it up are PSU and motherboard replacements. There can be other issues like mixed RAM, bad caps, out of date BIOS but that's a much smaller percentage.
So I bought myself a new GTX 1050 graphics card, because my computer used to restart every time I would play like more asking game it would restart or sometimes just shut down (my computer is fully cleaned and has or had dust whatsoever). One time it restarted watching a movie as well. So I figured out the problem is the graphics card. I had GTX 950 before. I got this graphics hard on Thursday and it was great. But today, I turned on my computer and after like 20 mins of it being turned on it restarted. I wasn't even doing anything on it and it just restarted. Maybe you guys know what's the problem? Maybe it's not the graphics card? This is the specs of my PC https://prnt.sc/iwnwl6 Any help would be appreciated. Thank you.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic