It's not always the vendor to blame.
Case in point: I have an iPhone 6 (2014), perfect condition, battery still at 92% capacity, nice slim form factor, decent display, just as good as when it was new.
Unfortunately, it stopped getting new iOS versions because the processor isn't powerful enough to support all the latest whizz-bang features that have been introduced lately. That in itself is not a showstopper, but then app vendors started refusing to install their apps on older versions of the OS. That is the thing that actually makes the phone obsolete, the lack of support by app creators, not the lack of support by Apple.
Also, consumers and the market are partly to blame for this, by demanding never-ending new features. Take iOS 15 for example. Compared to iOS 14, it is more complex, fiddly, and annoying to use, because it is starting to suffer from feature bloat. Things that in iOS 14 needed one tap, now start popping up menus and requiring many taps (I'm looking at you, "Do Not Disturb" mode). Life is too short to spend time configuring and organizing complex settings. OK if they are optional and hidden until you want them, but not when they force themselves on you.
Oh well, rant over.