This happened to me also. In context, the night before my iPhone 15 pro was fine. All I did was charge it for the night. when I woke up the next morning I tried to get on my phone but the screen was pitch black.
I was confused and I thought I forgot to plug in the charger into the wall. But, I took a screen shot and received notifications. I knew that the phone wasn't dead. I went online onto how to force restart the phone. That didn't work.
I later called apple support to see what I can do and they made an appointment for me the next day. So, I carried my plans of the day using my old android phone. when I come to check on it in my room the iPhone 15 pro seemed perfectly fine.
I'm still gonna go into that appointment I made to make sure nothing is really messed up about my iPhone 15 pro. This is my first iPhone in a really long time and so far I remember why I switched to android.