The iPhone lasts longer when kept between 0° and 35°C (32° to 95°F). Outside this range the battery can suffer, so don’t leave your phone in direct sunlight, in a glovebox, or on a parcel shelf in summer.
Using a case that doesn’t give your phone air can also lead to decreased battery life. If it gets really hot, you’ll see a warning message and your phone will have to cool down before you can use it again.
It’s also not a good idea to keep your device under your pillow at night, especially if it’s also on charge.
When operating technology it’s always best to remain chill. Stay cool and you will notice the benefits!