I would recommend testing your device in safe mode.
If your phone is misbehaving, it's possible that a third-party app is causing the issue. To figure out what app is acting funny, you can use the Safe Mode feature. In Safe Mode, your phone won't run any third-party apps. This allows you to easily identity and remove the app that may be causing the problem. Give this link a try: https://www.samsung.com/us/support/answer/ANS00062983
Are you using the stock camera app?
Have you tried resetting the camera setting?
-Go to the camera > click the gear in the top left corner > tap on reset settings > tap on reset
I would recommend force stopping and clearing the cache and data for the stock camera app. Go to settings > apps > camera > tap on force stop > tap on storage and clear the cache and data.
Next, I would recommend wiping the cache partition on your device. The system cache partition stores temporary system data. It's supposed to allow the system to access apps more quickly and efficiently, but sometimes things get cluttered and outdated, so a periodic cache clearing can help make the system run more smoothly. Give these steps a try:
Please keep me posted if you continue to experience these symptoms.