When a laptop will not charge, there are three suspects: the adapter, the port and the charging circuit on the motherboard. We test them in that order, because the adapter is the cheapest thing to be wrong.
Round charging sockets
The socket wears until the plug only works at a certain angle, then not at all. On many laptops it sits on a short cable and is replaced without touching the motherboard. On others it is soldered to the board, which is a longer job.
USB-C charging
USB-C ports carry power and data through the same connector, and the chips behind them are a common point of failure. A port that has gone loose is replaced; one that looks fine and does nothing usually needs a repair to the circuit behind it.
No power at all
A laptop that shows no light and no response may have a failed charging circuit, a short on the board or a battery that has shut itself down. This is diagnosed on the board. See motherboard repair.
Macs and Surface devices
On recent MacBook Pro models the MagSafe and USB-C ports sit on small separate boards. On Surface devices the Surface Connect port is a separate part on most models. In both cases a failed port need not mean a new main board.

