I just upgraded (??) from Mojave to Monterey and I also had problems with my iTunes music and playlists: they simply don't migrate automatically. I was finally able to get my music over but the playlists would not move. After several hours of searching the internet and even calling Apple support (3 different agents) no dice. All the solutions proposed here and elsewhere had us try to import the library.itl file from iTunes into Music. That did not work for me even though I still had the iTunes library.itl file available. I kept getting the following error message:
Then it hit me on Saturday: the playlists have to be first exported from iTunes. This means iTunes must still be available, hopefully on another machine or from a backup. But the way to do this is non-intuitive.
Here is the process for success:
1- Open the old iTunes that contains all your playlists.
2- In the left panel, select the first playlist in the list.
3- Once it is selected, click on File from the menu bar and select Library and then Export Playlist
4- Save the Exported playlist file
5- Open the Music app
6- Click on File from the menu bar and select Library and then Import Playlist
7- The playlist should appear in the left panel.
8- Repeat the above for each one of your playlists. I had 45 and it took me about 30 minutes for the whole operation.
9- When the last one is done, scream Eureka as loud as you can while cursing Apple for torturing music lovers like this.
It may be possible to batch export all playlists at once rather than one by one but I was not able to find a way to do this. But I'll trade 30 minutes to save me dozens of hours trying to recreate those playlists.
Amen!