Hello fawad85,
Let's start off by checking the helpful steps in this article which can help with this issue: If the camera or flash on your iPhone, iPad, or iPod touch isn't working. Follow this guidance:
"Remove case, accessory, or film and test
- Remove any case, accessory, or film that might block the camera or flash or that places a magnet near the camera.
- Test the camera by trying to take a photo.
- Test the LED flash:
- Try the flashlight in Control Center on your iPhone or Control Center on your iPad. On an iPhone X or later or an iPad, swipe down from the upper-right corner of the screen. On an iPhone 8 or earlier, swipe up from the bottom edge of any screen.
- Tap the Flashlight button .
If you want to try more steps on your own
If you prefer, here are some more steps you can try on your own if the camera isn't working. You might still need to contact Apple Support after following these steps.
- 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 to discuss service options.
- Restart your iPhone, iPad, or iPod touch.
- 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 ."
If the issue persists, further assistance may be needed. We want to make sure you reach the right team for help with your iPhone, so we recommend that you contact Apple Support directly. Depending on your region, you may be able to reach them here: Get Support.
Thank you for participating in the Apple Support Communities and have a wonderful day.