DSLRs upon connecting to a PC over USB generally don't immediately provide the functionality needed to pipe their images over that connection. However, several DSLR brands have started offering proprietary software enabling that option for a subset their cameras, such as Canon's OES Webcam Utility and Sony's Imaging Edge Webcam.
If your camera isn't supported by those utilities though, you'll have to capture the feed that the DSLR can generally output over HDMI (or Mini HDMI) using a capture card of some sort. Check here to see if your camera can produce a clean feed: https://www.elgato.com/en/cam-link/camera-check. For capture cards, the Elgato Cam Link is a great entry level device to make an HDMI feed appear as a webcam.