My microphone did't work on Windows Server 2019.
At first, I thougt it was the audio driver's problem, so I reinstalled the driver, but the problem remained. Then I saw Microphone privacy settings. I clicked it, I realized that there is Allow apps to access your microphone. And it was off. I turned it on, thank God, everything worked.
Here are the screenshots.