Please follow the below mentioned steps to resolve the issue:
• Please ensure that auto restart option is turned off (Step: Settings >Device Care>More> Auto restart
• Please clear data or cache of Camera Application(Settings>Apps>Camera>Storage>Clear Cache/data)
• Sometimes 3rd party apps may also cause the issue so check your device in Safe mode
• Check the availability of software update in your device
• If issue is still not resolved then create data backup and reset the device
For further assistance, register your concern in the Samsung members app (Open Samsung members app>click on “+“icon>send feedback>Error report/ Ask Questions).
Team Samsung Members