Hello Fabrice. To record audio coming through your headphones in Audacity on Windows 11, the best method is using Windows WASAPI loopback. WASAPI loopback records digital audio right from the output device. To set this up in Audacity, make go to Audio Setup>Host and select Windows WASAPI as the host. Next, for the recording input, it will help to select your playback device (i.e. "Headphones (loopback)"). You will then be able to record what you hear coming through your headphones, even if "Stereo Mix" isn't functioning, or isn't a relevant source in your case. It is vitally important to begin playing audio before you begin recording, otherwise it won't capture anything because WASAPI loopback needs an active stream. For further help on getting set up, be sure to check out Audacity's official desktop audio recording tutorial.
As for your bonus question; To get NVIDIA GeForce Experience to record only game audio and not any other audio coming from your browser or Discord, go to Settings > Privacy Control and set the desktop audio recording control to disabled. That way only the game audio will be captured. If you are interested in more modern setups, you can send non-game apps to separate outputs, using a program or utility like Voicemeeter or preferably Windows' App Volume and Device Preferences.
Hope this helps, please let me know if you have further questions.
Best regards,