macOS 27 Messages shows phone numbers instead of contact names — fix
After updating to macOS 27, Messages showed phone numbers instead of names even though the contacts were present in Contacts. Photos still showed correctly, and Messages even offered “Add to Contacts” for existing contacts.
Eventually this fixed it for me:
tccutil reset AddressBook com.apple.MobileSMS
Then quit and reopen Messages and allow Contacts access if prompted.
Likely a broken/stale macOS privacy permission between Messages and Contacts, not an iCloud sync issue.