USB File Transfer Not Working: How to Fix It
If your computer won't recognize your phone, the cause is almost always the USB mode, the cable, or a port — rarely a serious fault.

Check your USB connection setting
Most phones default to "Charging this device via USB" the moment you plug in — you have to manually switch that to "File transfer" or "PTP" every time, or the computer will never see the phone's contents. If that setting is already correct and still nothing shows up, try a different cable: many cheap USB cables are charge-only and don't have the internal wiring needed to transfer data. Use the original cable that came with the phone if you can, or one explicitly sold as a data cable.
Test both physical ports
Narrow down the problem by testing each side separately: plug a different device (a mouse, a USB drive) into the computer's port to confirm it works, then plug your phone into a USB port on a different computer to see whether the issue is with the phone or the first computer. If the phone detects moisture in its USB port, it will disable the connection automatically as a safety measure — in that case, unplug immediately, gently shake the device with the port facing down to clear any liquid, and let it air dry completely before trying again.
Check your computer
On Windows, open Device Manager to see if the phone shows up with a warning icon (a sign of a missing or corrupted driver), and restart the computer to force a clean reinstall of the USB drivers. On a Mac, make sure the Photos or Image Capture app actually has permission to access the device in the system's privacy settings, and restart the computer as well — a lot of USB recognition issues clear up with a full restart rather than reinstalling drivers.
Check your phone
If the problem still won't go away, check for a pending software update on the phone, then do a full restart: hold the Power and Volume Up buttons together and choose "Restart" rather than just locking and unlocking the screen. If none of this fixes it, the phone's own USB port may simply be worn out — worth checking before considering a repair or replacement. Compare today's top-rated smartphones if an upgrade turns out to be the simpler fix.