My mother's iPhone 6 is running iOS 15, which will be supported by all the apps she uses for at least 2-3 more years, bringing the total lifetime of her smartphone close to 10 years.
Sure, Apple is pretty draconian when it comes to how much the developers have to keep their tooling up to date, but that's not the same on the consumer side anymore