Decades plural might be a stretch but 8-12 years is doable now. My home desktop and that of my kids are some lightly upgraded Haswell (2013) i7 Dells.
The kids are getting new gaming PCs this week, but we got a solid 5 years from those Dells (after a business got 4) without feeling like it was a painful sacrifice. The kids gaming PCs are definitely faster, but the killer must-have is they support the anti-cheat checks for Valorant, otherwise I might have only upgraded GPUs.
We do build computers that last a decade. The core of my desktop is 10 years old albeit with newer SSDs and GPU. My old computer can do anything that a new computer can, just a little slower.
The M1/M2 MBPs are a pretty significant leap technologically. At some point intel Macs will receive less and less support and the price point of the M1 (used and new) will drop enough to justify the upgrade.
My PC from 2013 still has all of the components working except for the AMD GPU that got fried mainly due to a problem with my power supply.
The i7 is still going strong, brings back memories considering that at the time it was the latest generation of i7's and I was one of the first to buy it from my town according to the people working there.
Decades is a long time for anything to last. Mean time between screen breakage in my house is measured in months (I think I’ve shored that up to years by getting really good cases, fingers crossed).
My gaming PC is a decade old. Apple iPhones usually get feature updates for 70 months (sometimes more) and bug fix updates for 100 months or more. iPads are similar. This is longer than a single battery usually lasts, so you either get an external battery pack or you replace the battery.
Beyond a decade, and you need to throw Linux on them. But things physically wear out at that point. And the increased power consumption of older devices means that much past a decade, you’re paying much more in electricity costs than you would if you had replaced it with a similarly-specced modern device. …at least in principle.
If it’s a rarely used machine, you’re still better off with the old one.
With Moore's Law finally almost dead, it could be done. Though I should confess that my current laptop has been my current laptop for almost a decade, so it's been doable.