Try setting your cpu core ratio to 34.00 or 32.00 in bios, I was having random restarts and crashes as well on my 3600xt ryzen cpu+asus x470 i mobo until i lowered the cpu core ratio to 34.00 it then was fixed.
edit: also leave the cpu core voltage to auto in bios