nvidia – Ubuntu turning off every 30 seconds

I recently installed ubuntu on a brand-new Razer laptop. After installing, there were no problems for about two hours. All of a sudden, Ubuntu keeps turning itself off about every 30 seconds. I would try to look at syslogs but I barely have any time. I’m on Ubuntu 20.04. Should I try to get in quickly? I really don’t know at this point.