I looked at mine. It’s the same. Says there’s more on my phone than iCloud. But that’s just wrong. Let’s see what the fix in iOS 17.1 does. Have to hope it fixes all this. You could try getting the 17.1 b2 or b3 and see but I’m not doing that. I’ve got enough bugs already!
17.1 will likely be out the week of October 23 so hopefully it fixes things.
On a side note I noticed there’s a photo from 2020 missing from my Mac’s Messages Photo “album” that I can see in the thread. I can search for the messages before and after it though. It’s just not showing as a photo. I saw it on my iPad which is how I knew it was missing from my Mac.
The whole Messages attachments are just a mess as only “saved” attachments show up in the “album” and get removed if the attachment is removed for whatever reason. The photos visible in message threads are for some reason stored and indexed separately. That or they get messed up when iCloud Messages is enabled.