Summary
After updating to windows 11 camera is not functioning but it was working fine before the upgrade in windows 10.
Resolution
Fix #1:
Step 1:
Go to the search box next to the Windows icon and type CMD
Step 2:
Right-click on Command Prompt and select Run As Administrator
Step 3:
Type msdt.exe -id DeviceDiagnostic and press enter.
Step 4:
Click Next on the Hardware troubleshooter wizard.
Step 5:
Restart PC (Mandatory)
Alternative Solution: