Do you get the buzzing if you plug the microphone straight directly to the sound card (no extension)?
If the buzzing is being caused by the extension, then it's probably just acting as an antenna and picking up stray RF noise. You can fix this with a shielded cable, or wrap the cable in aluminum foil, or try adding RF chokes.
https/www.amazon.com/stardrift-10-Pack-Diameter-Ferrite-Suppressor/dp/B015RAZTIA
Another possibility is since the G231 is powered via the audio cable, the extension is too long and is dropping the voltage enough so the G231 no longer works properly. This might be remedied by using a shorter extension or an extension with thicker wires.
If the buzzing still happens without the extension, you can try the above solutions in case the microphone's cable is picking RF noise (cheap laptop AC adapters from eBay are a common source). But it's possible the sound card is picking up noise from components inside your PC. For this reason, most people who produce audio use an external audio capture device, which connects to the PC via USB. The device handles the D/A conversion internally, and usually has a metal enclosure which shields it from stray RF noise. The PC only gets raw digital audio via USB.
https
/www.amazon.com/Focusrite-Scarlett-Audio-Interface-Tools/dp/B01E6T56CM/