How do I record myself in GarageBand with a streaming Apple Music song as backing track?

Or you can just use a loopback audio interface. You do need to buy an app to do this in MacOS though.