Check Windows microphone permissions
Select the correct recording device
In Audacity: Edit → Preferences → Devices → Recording → select your microphone from the dropdown. Or use the toolbar dropdowns at the top of the Audacity window.
Switch audio host to WASAPI
Edit → Preferences → Devices → Host → change to Windows WASAPI. Then re-select your recording device and try again.
Other causes of Audacity not recording
Not recording questions
Audacity not recording after Windows Update
Windows updates often reset microphone privacy permissions. Go to Settings → Privacy & security → Microphone and re-enable access for desktop apps. Also restart Audacity after the permission change.
Audacity records but the waveform is flat
The microphone is selected but the input level is zero. Check: (1) the input level slider in Audacity's toolbar is above zero, (2) in Windows Sound settings the microphone volume is above 0%, (3) the microphone is not muted in Windows. Try speaking while watching the level meter — it should move.