Just last night, when I turned on my camera, the camera looked like something covered it up, and all that was on the screen was black. I switched back and forth between the front camera and the back camera, but the camera still showed black.
I had that happen on my iPhone 7, iPhone X and my iPhone 13 Pro. it just happens sometimes where the camera shutter doesn't open. force closing the camera app or rebooting fixes it.