Usual advice: ReInStAlL WiNdOwS! (if you're using it, of course, because someone forgot to mention their OS)
Silly advice: don't update your driver and don't play very intensive games, you dork - it's that simple!
Somewhat peculiar advice: go into the [Control Panel\All Control Panel Items\Administrative Tools], open Event Viewer, and take a look through the "Windows Logs" in subfolders "System" and "Application" for any critical errors to see if there's any particular thing that happens before a system crash (there are time stamps).
Very annoying and time-consuming advice: reset your BIOS, replace every major PC component (RAM, GPU, CPU, PSU, MoBo, etc.) one by one and reproduce the crash sequence each time until you find which one might be the cause of your issue.
Cop-out advice: send it to a good PC repair shop or return to the manufacturer (if it's a prebuilt PC).
W10Pro (22H2)|Kingston A400 240G|ASRock B550 Phantom Gaming 4 (L2.71)|Ryzen 5 5600|ID-Cooling SE-225-XT Black V2|nVidia RTX 3070 FE 8Gb|XPG GAMMIX D10 [2x8GB] DDR4 3200MHz (XMP)|DeepCool PK700D