Can’t run two programs at once

My pc can’t run more programs at once without both programs lagging. This wasn’t a problem on my previous pc. This pc has a GeForce rtx 4060, AMD Ryzen 5 7600X, 16GB DDR5, 1TB SSD. No matter what game I play or what website I’m watching something on, everything lags. I need tips on how to prevent this problem.