That's the problem. You need to discharge the battery once in a while or it builds up gas and expands. I had a 2015 that was perfect until I stopped going anywhere in March 2020. So I basically didn't unplug it for a year, and then the battery got explodey.
So now that I still work at home, I make sure to unplug my laptop once in a while just to drain it down a bit.
Edit: Not sure why I'm getting downvoted here. You still need to unplug your older Macs that don't have the software and firmware updates that do this automatically now.
I'm simply pointing out why OP had battery problems.