Lithium batteries lose capacity as they age, and how you use them affects how fast. The mechanisms are well understood and the practical advice is short.
What degrades a battery
Heat, most of all. Chemical degradation accelerates with temperature, and a phone left in a hot car or charging under a pillow ages faster than one that stays cool.
Time at high charge. A battery held at full charge sits under stress. Cycling between roughly twenty and eighty percent is meaningfully gentler than zero to a hundred.
Deep discharges. Running to empty regularly is harder on the cell than topping up.
Fast charging generates heat, which is why it is slightly worse than slow charging – though modern phones manage this reasonably.
What actually helps
Keep it out of the sun and out of hot cars. Remove a thick case if it gets hot while charging.
Use the charge limit feature if your phone has one – most now offer stopping at eighty percent, which is the single most effective setting.
Charge overnight with optimised charging enabled, which holds at eighty and finishes before you wake.
What does not matter
Fully discharging to calibrate, which applied to a battery chemistry that is decades obsolete. Closing apps, which does nothing for battery in most cases. Third-party chargers, provided they are from a reputable manufacturer.
When to replace
When capacity drops below about eighty percent, which most phones report in settings. Replacement is far cheaper than a new phone and restores both battery life and, on some models, performance.