All my iOS & iPadOS devices sync with iCloud just fine (regardless if it’s iCloud Drive or CloudKit in apps) but my iMac has been having issues syncing with iCloud Drive for years and nothing helps.
It works for a while, then it gets stuck syncing a mysterious 32-byte file forever, blocking any further uploads or downloads, making iCloud Drive pretty much useless if one expects to have files in sync and readily available across devices. At this point nothing works, neither files in iCloud Drive get synced, nor can I count on Ulysses and other apps that use iCloud to update properly.
killall bird
sometimes helps, but only a reboot resolves the issue, often for just about a day.
I just don’t hope any more that Apple will ever fix this mess that is iCloud.