With the current Lithium-Ion batteries and setting your device to Optimized Charging at Settings > Battery > Battery Health & Charging, it should not matter. These batteries will fail quicker when discharged to nothing and when overcharged. Apple will shut down your phone before the battery charge is completely depleted and the Optimized Charging is useful to prevent overcharging. Charging overnight is probably the best approach, as the Optimized Charging learns the charging behavior and will charge to 80% quickly, then charge to 100% right before you usually unplug it. Leaving the phone constantly at 100% for an extended period of time is harder on the battery, so charging it to 100% right before you need it is the best way to maintain your battery health.
In the old days with Ni-Cd batteries, they suffered from the memory effect and if charged regularly without letting it deplete would reduce the time the battery kept its charge. This no longer applies to the current battery technology.