Hello DanilaDz,
To start, we recommend following the guidance listed in the article below. This will help you isolate the behavior and potentially resolve what you're experiencing.
If the camera or flash on your iPhone, iPad, or iPod touch isn't working - Apple Support
"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
."
Should the issue persist you can continue with "If you want to try more steps on your own", however, after that you will want to reach out for available service options.
Take care.