If you're asking how long it will be before you encounter a game that literally refuses to load no matter how much you adjust graphics settings... I agree with paladin181 in that you've easily got the better part of a decade before you encounter a game that absolutely will not run.
But if you're asking about games being playable at an "acceptable level of quality"... well, that really depends on the games you play and the graphics quality you want to play at. The great thing about the PC platform is that you have so much control over your games -- you can tweak resolution, frame rate, texture quality, shadows, lighting, particle effects, ray tracing, draw distance, and dozens of other settings. Oftentimes, lowering a few graphics settings by just a single level will provide VERY tangible performance improvements while having minimal -- if any -- effect on visual fidelity. Simple tweaks like this could be enough of a performance improvement to extend the life of your hardware by at least one or two generations.
Also, a GPU upgrade can significantly extend the life of your system. Graphics demands tend to increase a lot faster than CPU demands. A GTX 2060 is a perfectly fine "mainstream" graphics card. Upgrading to a GTX 3070 or 3080 will extend the lifetime of your overall system, though I would wait until later this year or early next year for the prices to come down. I highly suspect that the next GTX 4000 series (whenever that comes) will be more of an incremental improvement over the 3000 series. That seems to be the way NVIDIA goes -- a big architectural improvement, followed by one or two generations of incremental refinements.
And, if I could offer some constructive personal advice:
GeraltOfRivia_PL: I know people here dislike me...
...if you left that one little "jab" out of your initial post, it would have completely changed the entire tone of this thread. You did indeed ask a very legitimate question ("How long will my system last?"), but you immediately came in with a chip on your shoulder by throwing in that "I know people here dislike me" comment. Saying things like that
immediately (before anyone has even responded) sets a confrontational tone to the entire discussion and often encourages certain types of people to respond who maybe otherwise would not. If you hadn't said that, this would have been a very simple question without any of the personal brouhaha that is derailing what would otherwise be an interesting discussion about system longevity which many of us enjoy engaging in.