If you get this error when trying to record in Audacity, please follow the steps below:

Right-click on the sound icon located on the lower-right part of your screen and select Recording devices.

Right click on the white area of the box and select show disabled devices

Right click on Stereo mix and select enable. Click Ok to exit that window.

Close Audacity and reopen Audacity and it should record now.