No, because battery capacity decreases are part of the normal aging process of any battery, whether it is in an iPhone or in a car or any other device that uses rechargeable batteries. If it reaches 80% within the warranty Apple will replace it for no charge. Out of warranty for an iPhone 7 it will cost $49 at an Apple store or authorized service provider.
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.
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.