Batteries are consumables; they lose a little capacity every time they are discharged, then recharged. On average this works out to about a 1% loss for every 25 “full charge cycles”. As one example, if you charge the phone overnight, every night (and that is what you should do; it is a best practice), it starts the day at 100%. If it drops to 20% by the end of the day before you charge it again overnight that counts as 0.8 full charge cycles (20% to 100%), or about 24 full charge cycles per month of use. For this example your battery capacity will lose about 1% per month. Of course, if the end-of-day level is higher than 20% the capacity loss will be a little less, and if it is lower than 20%, or you charge it during the day, the capacity loss will be higher.
Once the capacity drops below 80%, or if there is a message in Battery Health that the battery is not meeting peak performance expectations, it’s time to change the battery→iPhone Battery Replacement - Official Apple Support
The absolute best way to get maximum use on a charge, as well as slow the decline of battery capacity long term is to enable Optimized Battery Charging (Settings/Battery/Battery Health) and charge the device overnight, every night. The battery will fast charge to 80%, then pause. During the nighttime pause the phone will use mains power instead of battery power, allowing the battery to “rest”, and thus reducing the need to charge the battery quite as often. The phone will resume charging to reach 100% when you are ready to use your phone; it will “learn” your usage pattern. If you enable iCloud Backup (Settings/[your name]/iCloud - iCloud Backup) the phone will back up overnight also, assuring that you can never lose more than the current day’s updates. Here's more information→About Optimized Battery Charging on your iPhone - Apple Support