This might be the result of a feature called Lock Down Mode in newer
iPhones. To fix this issue, go to settings and seach for Lock Down.
Click on Lock Down and you should be able to see a semilar screen:
Select Turn Off Lockdown Mode. It will ask you to restart the device.
After restarting, the camera should work normally.