Perhaps check out the phone's own diagnostic tools @Samo111
These can check your camera.
If required a Samsung Experience Store or Samsung Service Centre can take a look too.
Current Phone > Samsung Z Fold³ 5G.
Just to add, if the camera performs well on the test, you could try resetting the settings in the Camera app > Settings > Reset settings > Reset. This will eliminate any issues with the enabled settings. 🙂