You might remember Soundflower - it was a handy add-on for MacOS X that ran in the background and let you invisibly route audio between applications without needing any external wiring. It's what Inter-App Audio does on iOS, but Apple never actually implemented a similar system on the Mac, hence the need for Soundflower.
Sadly, as MacOS developed and its core systems and code changed significantly, support for Soundflower - which came out in 2004 - became patchy and eventually it stopped working on more recent versions of the OS. Happily though, there's now an alternative. Blackhole from Existential Audio is free and works in much the same way.
After installation it appears as a virtual source and destination, letting you send audio between any applications on your Mac. So you can record pretty much anything internally without ever needing to route sound out and back into your hardware. It might sound like a small thing but it can be a huge time saver. There are some reported issues around OS X Catalina but these are likely to be ironed out in time. You can grab Blackhole now using the link below.
Paid software which is a little more polished and does the same thing includes Rogue Amoeba's Loopback and Audio Hijack for the Mac, or JACK Audio Connection Kit which is free and cross-platform.
Get the latest stable releases here: https://github.com/ExistentialAudio/BlackHole/releases
Learn more about OS X and audio recording: https://ask.audio/academy?nleloc=new-releases