Windows is a lot better than it used to be for gaming, but it's still set up for general use, so there are a number of tweaks ...
When a game is launched, whatever software is active in the background will continue ... You may also take a look at the Gaming Settings in Windows 11 and in Windows 10 and tweak them.