From my own experience: it might be the battery. Depending on the age of the battery, of course.
Some years ago when I looked into this myself, I managed to find a resource (blog? YT video?) where the person was able to identify the problematic cell in the battery cluster, remove it, and replace it with a good one. In order to save spending money on a new one, just to be clear.
I don't think this is the video I saw at the time, but there are similarities: https://www.youtube.com/watch?v=XFAsFV_7rAk