Problems with camera and error notification "Camera keeps stopping" occurs also on other Android devices, not only on Samsung phones. There are more recommended solutions how to solve this problem, so you can try them one by one:
- Restart the phone / Turn off the phone and then turn it on after 1 minute
- Stop the camera application - in Settings > Apps > Camera with button Force stop
- Clear the cache and data of the Camera appplication - go to Settings > Apps > Camera > Storage and use buttons Clear cache and Clear Data.
- Reset camera settings - go to Settings > Apps, tap on Camera gear icon and then on Reset settings
- Clear the cache from Recovery mode - in case of Samsung device turn off the phone, then press and hold Volume up button + Bixby button + Power button. Select option Wipe cache partition, then Yes and after it select Reboot system now.
- Run the phone in Safe mode - in safe mode, the system temporarily disable all third-party applications installed on your device. When camera works well in safe mode, it means the problem is most probably caused by a third-party app.
- Install the latest software updates - check for updates in Settings > Software update > Download and install
- Reinstall or update camera application
- Factory reset the phone - to do the factory reset, you have to boot the phone into Recovey mode and choose Wipe data / factory reset. Factory data reset is also available in Settings > General management > Reset > Factory data reset. I recommend to factory reset the phone from Recovery mode.
Please note that factory reset will delete your files and installed applications. Before running the factory reset, you have to check if Factory reset protection (FRP) is enabled or disabled. If FRP is enabled, you will have to enter your account credentials to perform the reset. It is possible that none of these solutions will work for your phone and you will need to contact the seller or Samsung support.