If your camera module has failed, your data should be safe and the phone should work fine except for the camera.
If you are on Android 11 you need to be connected to a PC to be able to clear cache.
If that doesn't work you will need to start a warranty claim.
RETIRED