Why phones stop charging
A charging fault usually starts small. Pocket lint, dust and fibres pack into the port whenever the phone goes into a bag or pocket, and the connector compacts them into a felt-like layer over the contacts. The cable still goes in, but it no longer seats fully, so the pins barely touch. The contacts also wear: every insertion scrapes away metal, and moisture starts the corrosion that turns a clean contact dull.
The cable is the next suspect. Lightning and USB-C plugs have a thin shell and a small internal tab that bends long before the cable looks damaged. Inside the phone, a worn battery can refuse charge or cut out early, while a failing charging IC — the chip that negotiates power and manages the charging cycle — leaves a healthy battery and a clean port with nothing to do.