Hello, thank you for reaching out to Microsoft Q&A.
Method 1: Reinstall the Camera Drivers.
Open the Device Manager.
Expand the arrow next to Cameras.
Right-click your default camera driver, select 'Uninstall device', select 'Attempt to remove the driver software for this device check box, and then click Uninstall.
Once uninstalled, restart your computer and check if it works.
If you are still having issues,
Method 2: install the Drivers from your Device Manufacturer's website.
Visit your PC manufacturer's website. (Asus/Dell/HP/Lenovo/etc...)
Select your device Model > Go to Drivers & download section > Download the latest Camera drivers for your device model and then install it.
Restart your computer.
Let me know if you still need more help.