MacOS How to mute microphone while recording music?

Hi everyone, I’m using Audacity on 2023 MacBook Pro M3 Pro and 2019 MacBook Pro i7. I’d like to record the music I’m playing without the sound/capture from microphone. I tried several methods online, but they are all outdated or don’t work. Does anyone use the new version MacBook and could provide any solutions? Thank you!

When you select the Line-in or the USB-device for recording, your microphone does not record anything - unless you are doing something “special”.

Tell us about your setup (what device is connected how / where) and your settings.