Was this helpful?
Try to condition the battery.
Let it go fully flat and recharge it to as much as it will accept,
discharge it fully and recharge again.
If it's going to recover, it will do so, or improve with 6 cycles.
Otherwise, it needs replacing. The battery warranty is usually very much shorter than the phone warranty.