Every bit of processor and memory that background apps don’t use is available to your game. Avoid running several game launchers at once while you play, since their downloads show up as network, disk and CPU activity in Task Manager.
Recording tools can cost performance as well. Windows 11 has built-in capture through the Game Bar, and you can turn it off under Settings, Gaming, Captures if it affects gameplay. If you also have a third-party recorder installed, check its settings so the two aren’t recording at the same time.
To stop apps launching every time you sign in, open Task Manager, select Startup apps on the left, right-click anything you don’t need straight away and choose Disable. You can still open those apps later. You don’t need to kill every process, because Windows does its own prioritizing, and it already gives extra priority to the app in front of you.