This is a 10 year old phone, released in 2014. Edit. I was wrong, 2015, sorry
Apple still sells previous phones as lesser, but still not very affordable, models. The iPhone 7 was released in September 2016 and discontinued in September 2019. It is also on iOS 15.8 so presumably also vulnerable to this. That would be about 4 years of security updates. Not the worst but not beating what e.g. Google promises for Pixel phones now.
While Google promises, Apple actually has a decade long track record of updating older phones for 5 or more years. We don’t know if Google will actually follow through on their promises or the execs in charge in 5 years will feel differently. But I personally bet $1000 that the iPhone 13 will get 5 years of OS updates minimum.