Yes, you can leave your iPhone charging overnight. Modern iPhones are equipped with built-in mechanisms to prevent overcharging. Once the battery reaches 100%, the charging process slows down and will stop, which helps to protect the battery health.
However, it’s a good practice to keep your iPhone charged between 20% and 80% to extend battery lifespan, if that’s something you are concerned about. Additionally, Apple has features such as Optimized Battery Charging, which learns your charging routine and delays charging past 80% until you need to use the device, helping to further preserve battery health.