Pc freezes, black screens, then opens bios

Basically, my pc recently has been freezing a lot recently and I’m not sure why. It freezes mostly when I play Diablo 4 but it has also been doing on in Black Ops 6. When it freezes it I can hear audio for a few seconds, then audio stops, then after about 30 seconds it black screens, then after another 30 seconds it opens the bios. I built the pc about 2.5 years ago and it has an Nzxt motherboard, ryzen 7 7800x, Msi 3080Ti, Corsair vengeance RGB pro 4x8gb kit 3200mhz. There is a red light on my mobo when I boot the pc that goes away after but due to my vertical gpu I can’t see what it is. I also tried google but haven’t been able to find anything. Any help?

Basically, my pc recently has been freezing a lot recently and I’m not sure why. It freezes mostly when I play Diablo 4 but it has also been doing on in Black Ops 6. When it freezes it I can hear audio for a few seconds, then audio stops, then after about 30 seconds it black screens, then after another 30 seconds it opens the bios. I built the pc about 2.5 years ago and it has an Nzxt motherboard, ryzen 7 7800x, Msi 3080Ti, Corsair vengeance RGB pro 4x8gb kit 3200mhz. There is a red light on my mobo when I boot the pc that goes away after but due to my vertical gpu I can’t see what it is. I also tried google but haven’t been able to find anything. Any help?