Phone batteries are lithium-ion cells, and they wear out through chemistry rather than use alone. Each full charge cycle nudges their maximum capacity down slightly. After roughly five hundred cycles most phones hold around 80% of the charge they did when new.
Heat accelerates that wear more than anything else. A phone left on a car dashboard or charged inside a thick case under a duvet ages far faster than one kept at room temperature.
Software matters too. A single misbehaving app that never sleeps can double your daily drain while the battery itself remains perfectly healthy.