Hello vanesa199,
The first thing we would suggest would be to power cycle the iPhone by pressing and holding the side button until "Power Off" appears. Drag the slider, then wait 30 seconds for your device to turn off. While simple, this can refresh the iOS, apps and connections. More information is available here: Restart your iPhone - Apple Support
If the problem remains, use these steps from If the camera or flash on your iPhone, iPad, or iPod touch isn't working - Apple Support:
1. Remove any case, accessory, or film that might block the camera or that places a magnet near the camera.
2. Test the camera by trying to take a photo.
3. If the photo is blurry, clean the front and back camera lenses with a microfiber cloth. If you see dirt or debris inside the lens or if the camera lens appears to be misaligned or blocked, contact Apple Support for help with your iPhone, iPad, or iPod touch.
4. Restart your iPhone, iPad, or iPod touch.
5. Test the camera again by taking a photo. If your device has a front and rear camera, check if one or both isn’t working. To switch cameras, tap the rotate button .
Have a good day.