Initially, Discord automatically sets the Microphone and Headphones to default, and it allows the inbuilt audio device to select it. The restarting solution will function normally on Windows, Mac OS X, and Linux versions as well.
Whenever, you remove the microphone physically from the desktop and reconnect it again, while Discord is running in the background, then it will persist. Make sure to connect the microphone to the desktop and then re-launch it, and it will solve the problem. You have to exit the program from the taskbar, and then re-launch it. The Discord configuration doesn’t work, and it will not function normally, and you have the error on the screen. However, you remove the microphone from the desktop and then reconnect it later. I came across a common problem that occurs when you connect a microphone when opening the program.