PC restarts while playing Minecraft?

Go
1

My PC crashes while playing minecraft (Minecraft only) and therefore wanted to ask for solutions.

System:

GPU: 5700xt

CPU: ryzen 5 3600

System: windows 10

RAM: 16 GB

de

How much RAM did you allocate to minecraft?