Hello Ahmadch007!
Follow these steps
- 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 the camera is still not working you can try to restart your iPhone and see if the problem persists. If so, contact Apple Support
See this link for further reference If the camera or flash on your iPhone, iPad, or iPod touch isn't working - Apple Support
I hope this is helpful. Good Luck!