This is a little late, but ever since the ios 18 update, my music libraries on my iphone and ipad pro have been totally screwed up. Almost every song was duplicated. If this wasn't bad enough, it removed a bunch of songs from the albums. However, the main library on the Mac M1 is fine.
I have resynced my iphone and ipad pro to my Mac and it has only made it worse. Now I have duplicate songs again and it has separated songs out of albums and made numerous albums that all of the songs for, should be under one album.
Keep in mind, I have about 1300 albums on my iMac. I have been trying to fix this for weeks. I do not subscribe to Apple Music, but I do have the Apple Music Sharing subscription or whatever it is that adds everything automatically to each device. No matter what settings I apply under Finder or in sync settings in itunes will remedy this.
The last thing that I want to do is delete my entire library on my Mac and reburn every CD individually. This isn't the first time this has happened. Some years ago under ios 14 or so the same thing happened.
Apple is turning into Win(blows).