It all depend on your use case scenario, for gaming it should not become obsolete in the next years.
Also if you get the right platform around it (meaning a B550 ox X570 motherboard + DDR4 3200 or better 3600 with good timmings), you will be able to buy a (lets imagine this will be the name) "Ryzen 4700X" (8 cores/16 threads) later on and have a (according to rummors) a nice bump in performance + a nice bump in cores and thread count.
Or you can spend a bit mroe and get an intel cpu with a B460 or Z490 mobo and be able to upgrad elater on too (keep in mind B460 mobos have limited DDR4 speed support, that depends on the CPU line you choose).