Hello there! I am Charity, I'm an Independent Advisor. I'm glad to help you today!
My apologies about that. Please Make sure that the Game Bar is set to record audio. Press Win + G to open the Game Bar, then go to the "Settings" (gear icon), and under "Capturing," ensure that "Audio to record" is set to either "Game" or "All." The "All" setting captures all audio, including game, system, and microphone.
Please let me know if this works for you.
Kind Regards,
Charity