Turn it back on, and go into the BIOS and leave it on, unplugged. This will prevent the OS from turning the machine off so the battery can completely discharge.
Let the battery completely drain until the machine shuts off and won’t turn on again. If this step lasts several hours (like 3 or more hours), it’s likely this procedure will work. The longer it takes, the better the result will be. If it lasts less than 1 hour, this procedure won’t work.
Plug it in and leave it off.
Leave it plugged in until it completely charges. Probably around 8 hours to be safe.
After that, turn it on and check your battery health.
It should now work again if the battery itself isn’t bad.
Note: this procedure permanently reduces the capacity of the battery, so it should only be done as a last resort before just replacing the battery.