When port, cable, charger and battery are all good but the phone still won't charge properly, the charging IC on the board may be faulty.
Common signs:
1. Charging icon shows but percentage doesn't rise.
2. Phone charges only when switched off.
3. Phone gets hot near one spot on the board when charging.
4. USB meter shows 5V but 0A, even with a new port and battery.
5. Phone was charged with a fake charger before the fault started.
What to do:
1. Rule out the simple parts first: port, cable, charger, battery.
2. Check for corrosion near the charging circuit.
3. Board level work (testing and replacing the IC) needs hot air, flux and a good technician.
Replacing a charging IC is usually cheaper than a new phone if the rest of the board is healthy.