Error Opening Recording Device

The first thing to check is that your recording device is present and working when view in the advanced sound settings control panel. See this post to get to this panel:-

Choose the recording devices tab and make sure that when your source is playing the level bars are active showing that input is working. Then select this device in audacity from the microphone selection window. If you are just trying to capture what is playing through your speakers then look at the playback tab to clarify which device you need. The playback device would normally be available for recording and show up with (loopback) suffix. You might need to choose the correct windows interface which is the selection to the left of the microphone symbol, wasapi probably being the best choice if it is available. Also check the pinned posts covering permission settings.