All Dell laptops can get this problem. Dell chargers have 3 wires. One thin in the middle is used to identify the charger so computer knows how much current it may draw. Without identifying the power source the computer will run at minimum power and not charge battery.
One might think it could at least slow charge it when computer is off but sadly it wont.
Sometimes that pin is bent and straighting it out fixes it. If not then motherboard needs to be replaced.