Controller batteries wear out like phone batteries.
1. Don't leave it charging all the time on a cable.
2. Charge it before it is completely empty.
3. Lower the controller's light bar brightness and vibration to save power.
4. Store it half charged if you won't use it for weeks.
5. Keep it away from heat.
When a controller lasts only an hour or two, the battery can usually be replaced by a technician.