Could be any number of things. I would start by checking the windows event log at around the time of restart and see if it wrote anything there. It should also let you know if it's restarting cleanly or just crashing. Or if it's shutting down from overheating maybe. That should hopefully point to a next step.
Buildapc
As others have said, check the system logs.
There's also a CPU temp monitor called core temp, available at http://alcpu.com/
Useful to see core temps, I think it does logging too.
UPDATE: Memtest ran all day without any problems; no issues found and it hasn’t rebooted during so I’m guessing it’s a software issue, rather than the PSU, right?
In my experience random restart issues happen either during extreme load or when idling in ultra-low power. Check the event viewer logs after the crash. Run memtest86. Go from there.
I know it sounds stupid, but are you sure it's not being caused by transient power outages? I thought this was happening to me until it happened one evening so I saw the light go off and on again at the same time and put two and two together.
I thought that too but nothing happened anywhere else in the house and power outages really aren't that common where I live.
Historically, I had a callout to a place where the machine rebooted whenever a train went past: crappy PSU with a dry joint.
Also a machine with an underspecified PSU that couldn't provide enough power. A physical or optical drive being accessed were enough to tip it over the edge.
Seconding PSU
Wow thats.. specific lol.
PSU is 700w which I believe counts as "overkill"
Yeah, about that... I had 110w cpu, max 200w gpu, other than that only minor things that don't have much power draw and my at thst time 800w PSU was the minimum.
I upgraded gpu, sometimes 300w spikes and that was it. Now have 1000w PSU. And since it happened so randomly clearly I'd think it's your PSU. 700w would be fine if it was guaranteed, but it isn't.
Got it. Its weird that it never happened before but its good to know what it could be. Memtest is running while I'm away but if that shows nothing I'm afraid its the PSU
I'm not sure how it is with Nvidia, but with AMD you can have the metric overlay running or even logging, so you could see if it happens on power drain.
For me it mostly happened only in one game (everspace 2) and only certain scenes and then not even always.
Has it only happened once?
No, at several occasions with different usages; while idling, while on lemmy and youtube and once during gaming.
Check the thermal paste for the CPU. Could need to be reapplied and has gotten old.
Quite possible - had this happen on a 2019 Dell (so it has some runtime on it).
Re-did the paste and now it's stable.
OP should also check the system log to see of it's recording the shutdowns, or of anything happens before them.
Could be update restarts (which is why I run an LTS version), and you may see nothing at all in the log which could point toward overheating.
Could be windows update. Some updates restart your PC when you're not using it
I was in the middle of using it several times but thanks for the suggestion.