What do you mean your PC is not connecting to your monitor? Are you getting a “not connected” or anything similar message on your monitor or just a blank screen?
If you’re getting a “not connected” or anything like it on your screen, it’s probably the cable, but if you’re just seeing a blank screen, there are lots of differents problems like issue on your video card, ram, or the motherboard itself.
I recommend some minor troubleshooting steps.
Use a different cable on your monitor. If it works, you just have to replace the cable.
Use a different monitor if its possible.
Try your monitor on a different PC.
There are other troubleshooting steps that we used to do with our old PC before it finally gave up on us, however I would not recommend it if you don’t have any experience in PC assembling. This is what we usually when we’re getting a black screen instead of a “no pc detected” or something like that.
We usually clean the the motherboard from the accumulated dust using a dry pressure air blower. We’d take off the ram and video card (assuming you’re not using the built-in video adapter of your motherboard) and clean the connectors.
If you’re planning to do the advanced steps, I’m consider you assume that there is a risk involve as you’re touching hardware parts, so I’m not really recommending it.
Another reason is that there are times that the transistors of the motherboard became bloated causing failure in the whole PC that’s why you’re just getting a blank screen.