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.
Daily Driver > Samsung Galaxy s²² Ultra 256Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "
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. 🙂