First please try a reboot by turning the device Off and On.
Do you have enough storage space ?
Can you try another camera app.
Then if the issue remains go into Settings - Apps - Camera - Storage - Clear Data.
If no help then turn the phone Off and from a set series of button pressess that takes you into the phones file system and clear the system cache.
Final self help troubleshooting is to Back-up and Factory Reset.
Very final option is to visit a Samsung service location or Samsung Experience Store who can run a diagnostic on the phone.
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 have no affiliation with Samsung.