Macbook keeps restarting overnight in charge and guest mode is broken
My macbook always restarts overnight on charge. It's been happening in Ventura and Sonoma. I've already contacted support and received the information to try charging in another user account, so I tried to do it in guest mode. However, when I boot into guest mode the screen goes black with only my cursor visible, and after restarting a few times I got safari to boot up. Youtube on guest mode safari doesn't work and it keeps saying that it cannot be played on my device. Is there any correlation between these two issues - is it a sign of a hardware issue? Or should I just proceed with a factory reset?
MacBook Air 13″, macOS 14.0