IPhone XR keeps freezing up?

I got my new phone about 2 days ago and ever since I've gotten it it's been freezing up. I try to reset it by pressing the two buttons but the screen just locks up for about 5 minutes and then the phone resets. It happened like 7 times today. About 3 hours ago my phone reset and now it's just a black screen with the apple symbol. What could this be?!

You've got a bad phone. Take it back and get it replaced.

I'd try a restore via iTunes if possible.

If it's brand new then return it for a replacement.