To make sure face detection works well, kindly follow the steps provided below:
Verify that your webcam is functioning properly.
Ensure that you have adequate lighting in your surroundings, preferably with a white background.
Adjust the position of your face in relation to the camera or consider repositioning the camera in a way that your full face is clearly visible in the preview.
Close any multimedia applications, such as Skype or other background apps, that might be utilizing the camera.
If you have an additional external webcam along with your laptop's inbuilt camera and your camera is not automatically detected, use the 'Select Camera' drop-down to manually choose the camera to use.