Hey rex e.,
Music is designed to sync from your Mac to your iPhone, but not from your iPhone to your Mac, and you can only sync with one Music library (computer) at a time. . This may be why you aren't seeing your playlists sync back to your Mac. This article explains the process: Sync music between your Mac and iPhone, iPad, or iPod touch - Apple Support
Theoretically, you transfer your Music library to your new Mac when you migrate to a new Mac, but you mentioned the migrations didn't completely work. Do you still have access to your old Mac? If you do, it may be worth trying to resync your Music library from the other computer or restore it from a Time Machine backup.
The only supported way to sync your library from your iPhone to your Mac is with an Apple Music or iTune Match subscription. This allows you to sync your music library on all your Apple devices.
Kindest Regards.