If the system shuts down completely (like power off) then it could be a heat issue. If the system restarts then it’s probably a software issue. There’s an option to automatically restart on system error (rt clk my computer > properties > advanced > startup & recovery > uncheck automatically restart. If it is heat related it could be dirt/dust or thermal compound failure between heatsink/fan & cpu. If laptop - Try blowing out the fan from the opposite direction it sucks usually bottom and dust/dirt will shoot out back or side. Desktop - open side (powered off & unplugged of course) look for big fan w/ metal cube under it and blow fan & between the fins of metal cube (heatsink) then blow out rest of motherboard. Post back w/ more info.
Fan was just replaced about 6-8 weeks ago. Thank you though
So then Laptop or Desktop, Power off or Restart?