My instinct is to keep using things till they die, whether bikes (which basically don't die) or computers. With the latter, the problem is keeping them secure. New features are added to software, new hardware has to be supported, and new security risks emerge. All of these require updates. Eventually, the number of us using older kit falls to a level that makes it unattractive to support, given the additional complexity of doing so for a few people (compared to getting income from new stuff!) I'm currently getting warnings that 3G will be switched off next year and my phone isn't up to using the 4G replacement.
That said, I'm writing this on a desktop bought significantly over 10 years ago, and successively upgraded in its OS. I got it onto Windows 10 with some difficulty (the monitor being the final obstacle - I had to replace that because of the lack of a driver). It just gets harder and harder each time. Similar with Android devices.
As Lightning Phil suggests, the more technical you are, the easier you find it to keep older kit going - but, probably, the more likely you are to want newer! You can install your own Android version when the manufacturers of your devices stop providing upgrades, generally after a pathetic one new version, but again it's still not completely simple. Just as you can put Linux on a PC.
There's a massive difference between gaming (always requires the latest machines) and my life in email, browsers, word processing and spreadsheets. That's why such an old computer is just fine for me. I've never made it in gaming past Freecell, though I did try the old Cycling Manager series.
I don't know whether this is really sustainable long term. We're getting steadily better at recycling, but it uses masses of energy. Can we really keep making stuff and throwing it in the (recycling) bin?