Can't access iCloud after system restore
When I tried unsuccessfully to download Catalina, my Mac wouldn't open Safari. So I did a system restore. Since the restore, my Mac isn't accessing iCloud. Notes, keychain, contacts, etc. are not syncing with my iPad or iPhone. In System Preferences>iCloud I have tried to sign out and sign in again, but it then asks me to keep a copy of iCloud data. Selecting to keep a copy has the little wheelie thingy spinning endlessly. Clicking the Stop-the-update then asked for my AppleID and password again. The wheelie thingy is spinning again so I can't sign out of iCloud. Rebooting takes me right back into the same loops. I tried removing the Mac from iCloud in my iPhone and iPad, hoping it would allow me to start over and set up iCloud from scratch on the Mac, but that did nothing. How can I fix my iCloud account?
MacBook Air 13", macOS 10.14