Either way should be safe for the battery.
Some general guidelines to maximize your battery's lifespan include:
1. Don't let the battery discharge too deeply on a regular basis. Make a habit of charging when it gets down to 30-40%.
2. Avoid excessive heat when charging (i.e., don't let it sit under a pillow or blanket while charging). It's not only harmful to the battery, it can also increase the risk for fire or explosion.
3. Quick charging can potentially put more stress on the battery over time. Although it's generally safe and probably won't cause a noticeable difference over the typical user's phone lifecycle (1-2 years), it could have an impact if you intend to keep the phone for a longer time (like 4-5 years).
4. Best evidence shows that charging up only to 80% on a regular basis also prolongs battery life (this is what Tesla recommends for its giant car batteries), but this can be a hassle, for two reasons. (1) You typically need a 3rd party app to limit the maximum charge, like AccuBattery, and (2) limiting yourself to battery that goes from 80% to 30-40% can be unfeasible in your day-to-day life.
Battery University is a great resource for more detailed info:
https://batteryuniversity.com/