Make sure that your webcam is not being used by another program at this time. Launch the built-in app Camera and make sure that everything works correctly.
Eventually, you should check the access to your camera. Go to the Windows Setting -> Privacy -> App permissions section -> Camera.
Check the permissions. Scroll down and check that recorder has access to your camera.