How to record specific application/game?

Hello i just started recording but i have came up with the problem that is:
-i’m playing a certain game that i want to record
-either listening to music or talking to friends
and i only want to record the game audio but so far i couldn’t find a software that could. Help me if you can.
Thank you

Probably best to look for a specialist “game recorder” application. General purpose audio recorders such as Audacity are not really suitable for recording games (though “may” work with “some” games).