Why does my iPhone shut off on its own?

A few days ago, my phone shut off at 5% and everyday since then that percentage started to increase till it reached 22% today. I read answers to similar problems and I followed some instructions but unfortunately, they didn't work ( When my phone shut off at 22%, I connected it to a charger and left it for fifteen minutes then rebooted the phone. I repeated those steps three times but I didn't reach my 1% goal. It shuts off at 13% now.) Does this mean my battery is damaged? Is there any way I can fix it?
Hoping you can help.
Welcome to iMore! It sounds like the battery won't last too much longer. Mine did that way several months before I finally upgraded to a new phone. It got worse with time. You should prepare to either upgrade to a new phone, or buy another battery. What model phone do you have. How old is it?

Original thread: https://forums.imore.com/threads/why-does-my-iphone-shut-off-on-its-own.386085/