If you want to capture the audio from some set of programs, can use the "application audio capture (beta)" source to capture these applications with OBS and only record these. An alternative solution is to configure these programs to output their audio to some specific audio output device no other application or Windows sound does output to, then capture this output device with OBS. This output device can be any output device. If you don't have any free device, you can plug in a second headset to have an additional one, or you can use some virtual audio device to create one.