Since your contacts are syncing correctly between your iPhone and iCloud, the issue on your Mac is likely a local synchronization stall or a configuration error within the Contacts app. Even after signing out and back in, your Mac may still be defaulting to a local "On My Mac" view or prioritizing a third-party account like Gmail instead of the iCloud database. To resolve this, ensure that "All iCloud" is selected in the View > Show Groups menu and that iCloud is set as your "Default Account" in the Contacts app settings. If the data still fails to appear, you can force a re-sync by toggling Contacts off in your iCloud settings, deleting the local database files located in the Library > Application Support > AddressBook folder, and then toggling Contacts back on to download a fresh copy from the cloud.