You didn't mention what temps your processor was showing when rendering and what CPU Cooler you have installed?
Which Windows version you have install nor Make & Model of your Motherboard and GPU and RAM.
A computer restarting during Rendering could be many factors involved like Overheating (GPU or CPU), poor Overclocking, bad power from PSU, Gpu Driver issue, incompatible program with processor, etc.
I have a 3700x and to keep it cool I installed a Hyper212 EVO CPU Cooler with a push-pull fan configuration and under stress it keeps the processor under 72C.
Rendering puts a lot of stress on both the GPU and CPU. So it could be a GPU issue or a CPU issue.
I suggest your download and run OCCT Diagnostic and run the PSU Test which run both the GPU and CPU tests at the same time putting maximum stress on the PSU. See if the computer shuts down and restarts again during the test.
If it does then just run the GPU and CPU tests separately and see if it shuts down.
during the time your testing check the PSU Outputs, CPU & GPU Temperatures, and Fan speeds.
Also when you upgraded to the 3700x did you check your motherboard's QVL List for RAM MEMORY for Matisse processor to see if your current RAM is listed as being compatible?
If it is listed check to see how many DIMM Slots it is compatible with and the maximum RAM speed it supports with your RAM installed.
Ram testing is good to physically discover defective RAM modules but it doesn't show if Ram is compatible or not.