There two main considerations when choosing a new computer which you hope will last for ten years.
The first is finding a model which is powerful enough to keep up with evolving standards that demand more performance over time. For that, I would suggest Core i5 or Ryzen 5 as opposed to Core i3 or Ryzen 3.
The second is reliability. PCs and laptops marketed primarily as business models from Lenovo, Dell, and HP generally are constructed with solid components and are built to last. One important point, regardless of brand or model, is to do a bit of regular maintenance such as opening the PC case and using a can of compressed air to blow the dust out once or twice a year. On a laptop blow the air into each of the vents/grilles.
We once owned a Dell Dimension 4550 equipped with a Pentium 4 cpu. After using it daily for eight years we passed it on to a daughter who, in turn, used it for another five years. We currently have a Lenovo laptop about 6 years old. It's built like a battleship, and it runs every bit as well today as it did when new. Over the years I replaced the 120GB SSD with a 240GB model, and added an extra stick of RAM so it now has 8GB total.
Me and my family been using i3 3210 with GTX 1050/8GB ram, but recently the power supply/motherboard started to fail and my parents are looking forward to buy a new PC than replacing/fixing them.
As I currently use laptop for all of my works, the new PC will be only for my parents - who doesn't play any games and only need a good, long-lasting machine for MS office, email, and youtube.
I'm not sure about one thing though - Which CPU should I go with? Intel i3 9100F or AMD Ryzen 3 3200g? Or should I go with i5 and Ryzen 5?
While their work isn't very demanding, (Both of my parents use Pentium e2200 as office PCs, and they haven't complained yet.) I'm not sure if there's advantage on office works between these two(four) CPUs. I also wonder if having more cores/threads result in better MS office environment and keep PC 'lag-free' for a long time.
Ram would be 32GB, with 1TB ssd from micron.