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.
Current Phone ~Samsung Note 20 Ultra 5G SM-N9860_256Gb SnapDragon 865+ Samsung One Ui 3.1/ Android 11.