If your PC restarts unprompted, freezes, or programs crash, this could indicate a RAM problem. We'll show you how to use the memory diagnostics tool to find out whether the RAM really is the problem.
If that doesn't work, create a Windows installation drive using another PC, boot from that flash drive, then head to Repair Your Computer > Troubleshoot > Startup Settings > Safe Mode with Networking.