DroidcamX is awesome software too. It works over USB or Wi-Fi with little latency. My Razer Blade laptop has a defect where it's webcam stopped being detected so now I just use DroidcamX. Obviously using a smartphone camera also drastically increases the quality of the image as well.
I ran into Droidcam during the pandemic when I needed a webcam and you could not find a decent one anywhere (or it would cost an arm and a leg). It works over USB or network, and it can connect two ways (phone can connect to PC or PC can connect to phone) so you can connect it over Internet or over VPN (like Tailscale). The PC app can work without a GUI so you can install the app for example on an old phone, connect it to power and use it as a surveillance camera too.