Thanks for reaching out GloverL196,
It sounds like you're having trouble using the rear camera in some apps, but not in others. We can help.
To get started, we'd suggest ensuring that your iPhone is up-to-date, since updates contain security and bug fixes that can often resolve abnormal behavior. After completing that, let's ensure all of your apps have the latest version as well. Both steps can be found below:
If that doesn't resolve it, your best bet would be to have the camera evaluated by an Apple Store or Apple Authorized Service Provider. If you need help locating one, you can connect with Apple directly using either Get Support or if you're in a region without direct support options, you can also Contact Apple for support and service.
Hope that helps.
Take care.