You still get the longest investment protection with the iPhone. The iPhone 7 or the first SE, which was released in 2016, will be provided with the current iOS releases until September 2022 and then with security updates for another 2 years, meaning you have a service life of 6-8 years.