Phone turns black

My iphone 15 plus suddenly turns black and a losing icon keeps spinning. Then it turns off and I can use it again, it is only for a few seconds.

I have updated to iOS 18.1 beta, could this be the issue. Is my phone broken?

I have tried restarting my phone

Phone turns black
 
 
Q