My mac freezes for a second and restarts all sites on chrome
It happened after I had a few streams open I had a warning pop up saying that my mac is running out of application memory where chrome was taking up quite a bit, and my mac froze and crashed. Started up again after near 5 minutes of being frozen, and I had a diagnostic report pop up but I brushed it off thinking it would be okay after the restart. However, even after restarting, after 30 minutes or so, my mac freezes and then proceeds to refresh all my tabs on chrome. Previously, my chrome tabs would go inactive and save as such, but now every site no longer goes inactive and all the paused youtube videos subsequently play all at once. It's extremely annoying and I don't know what's causing it to suddenly short like this, my mac also feels sluggish despite my internet speed being fine, sites sometimes take a while to refresh, youtube videos lag (i rewind to the same spot and it lags at a different spot), certain applications lag when they never did before.
I ran the apple diagnostic but nothing comes up. Please help.
MacBook Pro 14″