It's not as difficult as it may seem, you just need to tinker
Win+R - Regedit
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\
then you need to find out the exact name of the executable file of the program (game). To do this, just right-click on its shortcut and go to properties. After that, in the "Shortcut" section — in the "Object" line, copy the name of the executable file
now, in the open registry branch, create a section (folder) with the name of the executable file of the program
next, in the branch with the name of the game (program), create another section (folder) and name it "PerfOptions"
the final touch: in the "PerfOptions" section, create a DWORD parameter (32), name it "CpuPriorityClass" and set the value based on the requirements (note: 1 — low priority; 5 — below average; 8 — average; 6 — above average; 3 — high).
now, when you start the game, Windows will automatically prioritize it.