Battery not working
Common Laptop battery issues can be traced to it not charging.
Faulty charger. This needs to be checked with an alternative charger at the correct amp setting to determine if this is your issue.If the charger cable is damaged it may be able to run the laptop but not charge the battery.
In any case it would need replacing either with a genuine replacement or a Universal fitting.
Batteries do have a limited life and when left plugged into the charger constantly they will die quicker, often after only a year. Replacements are usually of a higher quality than the original supplied model as the originals are often fitted with a budget model to keep the price down.