You need to configure the game to output its sound to some specific Windows audio device. Many games allow this, but not all. It's within the game's audio settings.
If your game allows this, go and install a virtual audio device, for example this:
https://www.vb-audio.com/Cable/index.htm
After installation, direct the game to output its sound to the new audio device. Your game is now silent, because it doesn't output to desktop audio any more. To re-establish sound output, open the sound control (Windows settings->System->Sound, then top right corner sound system control or what it's called in english). It's the old Windows 7 sound control center with the tabs Playback, Recording, Sound and Communication. Go to the Recording tab and open the properties of the virtual audio device. Go to the second tab and activate "Listen to this device" and activate output either to the default audio device or to your speakers - wherever you want to listen to the game audio. This re-establishes audio output from the game to your speakers or headphones.
In OBS, in Settings->Audio remove the previous audio device (probably "default") and replace it with the virtual audio device.
This way you "tapped" the game audio before it is mixed with all the other Windows audio.