Okay I got it figured out well sorta… this is with a bunch of assumptions that I don’t know how Apple did everything. But iTunes helped a bunch.
If you pull up iTunes and look at your songs list. Add the “iCloud Status” column. This will display how your music is held at Apple.
I was always under the assumption that when I moved it to Apple Music when it came out in 2015 or whenever I moved it, it tracked that it was my music. It didn’t. So at some point in the iOS16 upgrade. All those original files where you could play the song from broke, because it was playing an Apple Music song not your song.
So the easiest fix is to take that music that is hopefully still on your computer move it back to iTunes. It will create a temporary duplicate record, but that duplicate record once you click sync to iCloud, will merge with the Grey record and overwrite it. If it can find a song it’ll say matched. If it can’t it’ll say uploaded and you’ll now have songs that dropped off your music that you didn’t know about either.
So the ones that say matched here are ones that said “Apple Music” previously but I moved my file in from my computer and it overrode the file there and now it’s synced correctly again.
Unfortunately it looks like that nukes the playlist record. No idea why it overrides it in one but deletes it in the other.