If you can't connect your computer to your phone using a USB cable, the most likely reasons are: a faulty USB cable, incorrect connection mode on your phone, dirty USB ports on either device, or outdated drivers on your computer.
Try using a different cable, checking your phone's USB settings to select "file transfer", cleaning the ports, and updating your computer's USB drivers.