As more and more phones are coming with batteries you can't necessarily replace very easily (in order to maintain IP68 dust and water ingress resistance), it's important to get into the good habit of treating your battery well in order to maximize its longevity.
Temperatures: Lithium-Ion batteries operate best within a range close to room temperature. Keeping a phone exposed to freezing temperatures or anything over 35 degrees Celsius decreases battery age in the long run and also adversely affects the maximum capacity of a battery at any given moment.
When to charge: It's important to keep batteries between 20% and 80% charge as often as possible. While many laptops have software and firmware in place that ensure a laptop doesn't stay at maximum charge too often, it differs for phones. It's important to avoid having your battery drain completely, as that does adversely affect battery life in the long time. Likewise, fast charging is designed to keep battery levels where you can be on the go as quickly as possible, but still stress the battery's overall age and maximum capacity.