It's simple - just do not expose the battery to any extremes (state-of-charge, charging/discharging power, temperatures).
Hyundai recently released an interesting basic set of tips on how to maximize EV battery life in its plug-ins (which refers also to other plug-ins in general).
However, battery capacity, and in some cases also the power output (both ways - for charging and acceleration) might gradually decrease over time.
"There are many ways you can maximize the battery life of your Hyundai electric vehicle? Watch this video to learn useful tips and strategies that can help ensure that your Hyundai EV maintains a powerful, long-lasting battery."
Tip 1: Avoid discharging the battery to very low levels
The first advice is to not discharge to very low levels frequently and not to go below 20% on a daily basis.
It other words, don't use the full range of the vehicle if it's not necessary (if there is an opportunity to recharge).
Interestingly, Hyundai does not add avoiding a high state of charge here - as it turns out, it's included separately in the last tip.
Tip 2: Charge more frequently
The second thing is to charge frequently - like every day, after returning home. The battery will then not sit too long, deeply depleted.
Tip 3: Avoid extended periods of heavy acceleration
Tip number three is kind of common for all vehicles - to not hammer them too much and for too long.
Extended periods of heavy acceleration results in not only in surge discharge currents but also gradually heats the battery cells.
Tip 4: If parking for extended periods of time, park in the shade
Extended periods on a parking lot? Well, it would be smart to find shade, or even better we assume - a charging point in a shade.
That's for the summer, while in the winter we could imagine something else. Pre-heat the car using electricity from the mains, to not waste the energy from the battery while driving later.
Tip 5: Lower your maximum charging limit
At least in some Hyundai models, there is an option to set up the maximum state-of-charge, separately for DC and AC charging. The owner can set the maximum for let's say 80%, to not expose the battery on the high charging level if it's not required.
While AC charging is usually at low power (several to 11 kW), the DC fast charging might be quite high.
In general, it's wise to charge EVs also only to 80-90% if the full range is not needed on a daily basis.
All of those tips come down to not using the battery to the maximum, to its extreme. In return, it might serve for many years without a premature capacity fade.