You might have another application running that is reserving the camera. Such applications may include e.g. Teams, Zoom or Google Meet.
Close all open applications that might reserve the camera (using Task Manager to end the applications is an effective way). If that doesn't help, try restarting the computer.
Some laptop manufacturer's software may disable the webcam by default. Make sure that the webcam is enabled by default in those softwares.
For example Lenovo has Communications settings as follows:
If you're using Google Chrome as your browser, remember to allow Recright to use the camera. You can do it by clicking the small lock on the left side of the address bar, as shown below.