Does Time Machine back up iCloud files?
Unless you’ve added your iCloud Drive folder to the list of exclusions in Time Machine’s System Preferences pane, Time Machine should make local backups of all visible files in that folder, but not invisible items like iCloud Keychain. Check by trying to restore some.