A few ideas.
Open the Camera's Settings & scroll down to Reset Camera Settings.
Settings > Apps search for the Camera & Click on Storage - Clear BOTH Cache & Data for the Camera.
You can also open the Samsung Members app Click on Support & View Tests. Test the Camera to see if you get any error messages.
Boot into Recovery & Wipe Cache.
Last resort before visiting a Samsung Service center, Backup your device with Smart Switch & Factory Reset.
Hi, as suggested by RedDogRabbit.
Please follow the steps given by RedDogRabbit.
Before performing factory data reset please read the given below information.
You can perform a factory reset. This feature will completely erase your personal information and data.
Please perform a backup and save any information you need prior to the factory reset because otherwise your personal information may not be recovered. If you have an encrypted microSD card, you must decrypt it before resetting the phone. Otherwise, your phone will not be able to read the data on the card. From Settings, search for and select Decrypt SD card, and then use the on-screen prompts.
From Settings, search for and select Factory data reset. Next, tap Factory data reset again, and then review the information. When you are ready, swipe to and tap Reset. If you have a security lock set on the phone, you will be asked to enter the credentials. To delete all information and downloaded apps, tap Delete all. Your phone will reset; when it turns back on, it will start from the initial setup screen.
Thank you RedDogRabbit.