Chosen Solution
The rear camera doesn’t work. when I open the camera app with the rear camera the screen stays black. Front camera works fine. Flash works fine. I have restored it to factory settings. The software is up to date. I don’t know what else to do.
You may have a defective camera. Check out this guide to see if you are comfortable with replacing it yourself. It’s not a difficult repair and you can get parts and the necessary tools as a kit right here on iFixit.