Have you tried diabling the automatic restart option in your settings? Right click computer -> Properties -> Advanced System Settings -> Startup and Recovery Settings -> De-select checkbox ‘Automatically restart’ and select checkbox ‘Write an event to the system log’ (if it’s not selected).
You can also look in %SystemRoot% (usually C:\Windows) for memory.DMP but it might be very very large, like 628mb on my work machine lol. Running the Disc cleanup tool will allow you to clean this file so you can easily read any new logs in it. It’s the Debug Dump Files option in disc cleanup I believe.
The idea is to get the ‘blue screen’ with the error codes. This is how I figured out my PC was trying to automatically OC my CPU when I ran certain games and would cause a machine restart.