Run built-in camera troubleshooter that can diagnose and fix common camera problems.
Try using the camera in the Camera app or other apps that require camera access. This will help you determine if the problem is specific to a particular app.
Outdated camera drivers can cause malfunction. Update your camera drivers to the latest version. You can update them manually through Device Manager or use Windows Update.