MacOS Record Line Out Audio

The old school way would be to buy an external USB device that provides 2 3.5mm jack, line in and line out. Buy a 3.5mm male-to-male cable and plug into both ports. There is an easier alternative and it is free.

MacBook does not provide 3.5mm line in port
3.5mm cable male-to-male