A lot of issues can happen when you have neglected cleaning dust from fins on the cpu, gpu. If you haven't cleaned lately give the system a good going over. Heat is your number one enemy in any pc. Be sure you have enough air pushing into the case and that your fans are performing when you jump into a game. Are they speeding up? Check the power supply.
I just cleaned one of my pc's that's about the same age as yours and could not believe how much dust was buried in the fins but still ran perfectly fine.
M.2Gaming
AsRock Taichi Carrara, AMD Ryzen 9 7900X, M.2 MP600 Pro LPX, G.Skill 64GB, Creative SB ZXR, Windows 11