Hi Welcome to JustAnswer
Since when this problem started happening ?
Please try this and let me know how it goes :-
Get to Device Manager, Uninstall Battery driver & restart your machine
Ok. Are you sure its charging's issue only. Do you see any changes on your screen when you plug your charger, I mean any charging symbol ?
Also try using some other switchboards,some other laptop and charger combination to see if it not hardware issue.
Also check if battery settings are not wrong
In the Control Panel, open up the Power Options. Open the plan settings and visually check that all are properly set.
You can also try removing battery and charger out and press the power button for 10 seconds and see if helps in your case.
It seems like it is a battery's issue and you will have to replace your battery if charger and battery port/socket is not having any problem.
Above steps which you performed made sure that there is nothing wrong with laptop and/or its battery settings.
Does this issue still persist ?