To use the camera, the camera drivers must function well, or else it would break the connection between the hardware and the software. Thus, our first approach to solving the issue in the discussion ...
Since the issue pertains to the Camera app, the first thing you should do to remediate this is to run the Camera troubleshooting utility. You will find the option for this in the Windows Settings.