I know of a legacy problem where Audacity wouldn’t connect to an interface if the MONO/STEREO didn’t match. Also you can run into troubles if the sampling rates don’t match. 44100, 48000, etc.
Stereo, 44100 is a generic, ordinary setting. It’s a good starting point even if you don’t intend to actually run everything at those settings.
I am running OSX Monterey 12.7.4 on MacBook Pro and Audacity 3.4.2
I must RESCAN input device every time I want to record a new track. If I do not, I get the same error that this OP described every time. My workaround is to do just that; rescan every time before recording.
I’ve checked the sound settings on both Audacity and the MacBook Pro and made sure all recommendations have been followed when researching suggestions on this forum and elsewhere.