Hi, I am sorry to hear you are having camera problems. If your phone is displaying a "Camera Failed" message, freezing, lagging, or the preview is not displaying, the good news is that it's most likely a software issue and not a physical issue with the camera. Give these steps a try: https://www.samsung.com/us/support/troubleshooting/TSG01001329/
You can also try wiping your device's cache partition. The steps for that are:
Performing a wipe cache partition removes any temporary files that may be causing an issue with the device. All personal files and settings are not affected by this option.
- Ensure the device is powered off.
If the device is unresponsive/frozen, press and hold the Power button (located on the upper-left edge) for approximately 10 seconds or until the device power cycles.
- Press and hold the Volume Up button (located on the upper-left edge) and the Home button (located at the bottom in the middle).
- While continuing to hold the Home and Volume Up buttons, press and hold the Power button (located on the right edge) until "RECOVERY BOOTING" appears in the upper left then release all buttons.
- Select wipe cache partition.
Utilize the Volume Up/Down buttons to highlight and the Power button to select.
- Select reboot system now.
Option is highlighted, utilize the Power button to select.
Please let me know if this helps.