FYI - one of the reasons everyone is suggesting a 8th gen Intel chip (or better) is because of MS requirements for computers that run Windows 11. Long short short, you'll need a 8th gen Intel chip or newer to run Windows 11 (I'm not sure the min generation requirements for AMD chips). Now obviously all of us would recommend you stay on Windows 10 for as long as possible, but if you are going to have to spend money on some new hardware, it might as well be something you could use with Windows 11 if you are forced to do so in the future.
That being said, I also think it is the AI that is causing all of your slowdowns. I think getting a newer/faster machine could fix the issue, but I also suspect that using a dedicated graphics card is the best long term solution. However there is a min generation requirement for graphics cards to with with the new AI system, so be sure to do a little research before you go off buying the cheapest used card you can find. If the card doesn't meet the min requirements for the AI software, it won't actually help solve your problems.