I have had the problem for ages that with some games such as Forza Horizon 4, Raft, Rocket League, Asetto Corsa and also a few more games if I want to watch a few YouTube videos on the side, they lag but with other games such as Minecraft or Fortnite that doesn't happen, the hardware shouldn't be lacking with a 1660S and r5 2600 with 16gb 3000mhz ram my pc should actually be able to handle it very easily. So far I have only noticed the problem with chrome and Opera. I don't use any other.
Windows may assign too little performance to the browser because today's games eat up performance until it is no longer so that too little is left for the browser. So it is necessary to get Windows to assign more.
Here are instructions on how to start a program with a higher priority:
https://www.computerbild.de/...130.html#1
You can set the priority for the browser to "higher than normal" or "high". Then the browser should no longer lag with Youtube.
I did but the application will reset itself to low after a few minutes
Hmm then do it so that you don't set the browser to high but the game to lower than normal or low. In-game this should only have minimal effects, but the browser runs smoothly.
If that doesn't work either because e.g. Any anticheat software in between then unfortunately I don't know what to do next.
Your graphics card is simply reaching its limit. YouTube is implemented in most browsers nowadays via hardware acceleration. Means your GPU is responsible for the decoding. But when she is busy rendering the games, there's not enough power left for the rest.