Hello, sidneysk.
We understand that your rear facing camera isn’t working. Thanks for taking the time to post. We are glad to help.
The fact that the camera doesn’t work in other apps tells us that this might be a hardware issue and you should contact Apple Support to look into your service options.
There are a couple of steps we can take to help rule out a software issue. First, we advise that your Restart your iPhone. This straightforward troubleshooting step is quick and often resolves any number of issues.
We also suggest that you ensure that your device is backed up and up-to-date.
How to back up your iPhone, iPad, and iPod touch
Set up iCloud on your iPhone, iPad, or iPod touch
Update your iPhone, iPad, or iPod touch
After backing up, you can also Restore your iPhone, iPad, or iPod to factory settings. If the camera doesn’t work after setting the device up as new, you can be sure that this is hardware related. If the issue is resolved, signing into iCloud on your device to restore iCloud data only would be a smart way to ensure you do not bring the issue back to you device by restoring a full backup.
We hope this is helpful information.
Be Well.