Yes. If you have an Android phone, it can be configured to function as a webcam. You need to install an Android app, such as DroidCam Wireless Webcam, on your smartphone. Repeat the process by downloading the same app, called the DroidCam Client app, as a file on your PC.
Once downloaded, click on the contents of the file and follow the steps to complete installation of the DroidCam Client app on your PC. Once installed, refer to the Device IP and DroidCam Port displayed on your phone and enter this information into the “Connect over WiFi” section in your DroidCam Client app. Once connected, you can select from the menu of options and activate your phone as a webcam.