I left the computer for about an hour and a half and the result was to find it rebooted. I tried to reinstall macOS from recovery this afternoon but the problem is still here. Could this be an issue only affecting M2 Macs?