How often should you upgrade a gaming PC?

I just got a gaming PC a year ago, and I feel like it’s already getting a bit outdated. But, I can still play most new games without issue. Sadly, I don’t think it’ll hold up for much longer. How often should a person upgrade their PC or upgrade to a better PC?

I think every 2 to 3 years depending on how it’s running. Let’s say CPU - 3 years, GPU - 1 year

You can upgrade it every 6 months if you want.

I think every 3 years it is required to upgrade the gaming PC. You may have to mostly upgrade the RAM and the graphics card as required as well. I also think that graphics card is what is required to be upgraded. I think regular upgrades also help with the maintenance issues later.