I understand you are getting plugged in not charging error on your PC.
Don't worry I'd like to help you out.
Did you make any software or hardware changes on your PC?
Please provide the product number of your PC to assist your better.
Please try the steps recommended below.
Note: Before trying out the below solution, you should try to unplug the charger and remove and reinsert the battery and see if it’s working. Sometimes restarting your PC also fixes this problem. If it’s not working, follow the steps below.
1. Right click on Windows icon to expand out its context menu. Find and click on the option entry named Device Manager as shown below.
2. A window named Device Manager will open up. Expand the entry named Batteries by clicking on the side arrow associated with it. As next, right click on Microsoft ACPI-Compliant Control Method Battery and click on the Uninstall option.
3. The next step is to click on the tab named Action and then to click on the option Scan for hardware changes.
4. Now expand the entry Batteries once again by clicking on the side arrow just like before. As next, right click on Microsoft ACPI-Compliant Control Method Battery and click on the Update Driver Software option.
5. Now you will be asked to choose a method to search for the driver software. If you have the driver all set already, then you can click on the option Browse my computer for driver software. Else you can ask Windows to find the appropriate driver software by itself by clicking on the option Search automatically for updated driver software.
Also, please update the drivers on your PC using HP support assistant.
Refer this article to know how to use HP support assistant.