Have you tried clearing the cache on the camera app?
Navigate to your settings > apps > click on the 3 dots in the top right corner > select "Show System Apps" > find and click on Camera > storage > clear cache.
Have you tried downloading a third-party camera app or any third-party app that uses the camera to see if the same symptoms still occur?
Do you experience this while your phone is booted into safe mode?
Let's try putting the device in Safe mode to determine if there are external factors that cause this symptom. This step will temporarily disable all your third-party apps, but none of your personal data will be deleted. Your customization settings (Wallpaper, Themes, et cetera) will be reset to default once you exit this mode.
Please follow the steps below:
1. Turn the device off.
2. Press and hold the Power key past the model name screen.
3. When "SAMSUNG" appears on the screen, release the Power key.
4. Immediately after releasing the Power key, press and hold the Volume down key.
5. Continue to hold the Volume down key until the device finishes restarting.
6. Safe mode will display in the bottom left corner of the screen.
7. Release the Volume down key when you see Safe Mode.
8. To exit Safe Mode, restart your device.
Let us know how your device responds after performing this step!