Have you tried (if it will allow it) running it with the power cord and the battery out, to see if it will work?
It could be the charger cord, the battery, or both.
If the charger cord is damaged, and you don't have to see the damage, then it may well not be able to both run the laptop and charge the battery. If the battery is problematic on top of that, it will no longer charge.
First I would test the charger cord. By pulling the battery as mentioned above and also trying your cord on another device and trying another cord on your laptop.