- Edited
I am fairly sure iPhones are not supported for 10 years but I would be fine with an example that proves otherwise?
iPhones still offer the longest support period of any phone on the market. The iPhone 6S is still supported today with iOS15, which is still getting security fixes.
iOS15 is somewhat special, in that it's the first version of iOS to be supported for more than a year, but nonetheless, the iPhone 6S is getting almost 8 years worth of updates. It's reasonable to think, based on past experience, that newer iPhones will be supported for longer.
So if all you care about is cost (and you expect your phone to never need repairing), the latest iPhone SE is a very cost-effective purchase, because total cost of ownership will continue to go down over the years. If you hold the phone for 6-7 years, you get slightly more bang for your buck than the Google Pixel, assuming you don't buy on sale. But it's still very close. And you also have to take into account total battery capacity degradation over time. iPhone battery replacements are expensive.