@ Ben J. re optimize. It's a bit jumbled, but here are the bits and pieces I assembled re do not optimize if you want TM to back up everything.
These settings are in System Settings > Your Name/Apple ID > iCloud Drive & be sure [Desktop & Documents Folders] is
not turned on.
If you have disabled Optimize Mac Storage in iCloud Settings, then Sonoma ensures that local copies of all files in iCloud Drive are also stored locally, and they will all be backed up. If you have enabled Optimize Mac Storage, then it shouldn’t take too long to manually download all files and folders in iCloud that you want backed up, if they have been evicted, provided that you have sufficient free local storage. Once they have been backed up, you can then evict those that you don’t want to remain stored locally.
Note this - Because Pages, Keynote & Numbers are on icloud. Items on icloud don't backup only exception is your photo library because it saves the library file. It's the same as with iphone and icloud backups.
From a Level 10 on Apple Support
Time Machine will backup iCloud Drive, as long as you have not enabled "Optimise Mac Storage". If "Optimise ..." is enabled, it will be a game of chance, which documents have been downloaded from iCloud are locally available on your computer, when Time Machine is running.
From
https://www.mac-forums.com/threads/does-time-machine-backup-icloud-drive.378663/#post-1944158
No. You have NOT evicted the folder with that action [i.e., dragging and dropping a folder, in the Finder, from Home folder to iCloud Drive.] . Eviction is a system function that only operates if Optimize is turned ON. When the system detects that the file/folder has not been accessed recently (whatever that means), it then moves the file to iCloud and replaces it on the local drive with a dataless file that only contains the information that the system needs to retrieve that file/folder from iCloud when you ask for it. The system shows what files/folders have been evicted that way with the little cloud icon. Basically, to get that file/folder back to the local drive, you need to download it by opening it, which forces it to be retrieved from iCloud.
From a Mac forum
If you do not select the Optimize storage parameter (which offloads local storage data to iCloud), then the full data content of everything is mirrored on your local drive and your regular Time Machine backup will pick that all up. Your contacts are in the Library directory, so is all your email, your photos are in the Pictures directory. Everything else is just files in your home directory
From eclecticlightcompany
WHAT DOES TIME MACHINE BACK UP?
By default, Time Machine backs up almost everything on volumes it's set to back up. It doesn't, of course, try to back anything up from the Signed System Volume (SSV) containing macOS itself, and there are a few folders it automatically excludes, such as the hidden folder at the root of each volume containing the versions database (as that can't be restored in any case). But unless you add iCloud Drive to its exclusion list from your Home Library folder, Time Machine will back up all the files and folders in iCloud Drive as long as they're stored locally at the time it makes that backup.
Unless you manually exclude iCloud Drive from Time Machine backups, the contents of iCloud Drive will be backed up provided that items haven’t been evicted from local storage.
If Optimise Mac Storage is turned off, the whole of iCloud Drive will be backed up by Time Machine, as eviction doesn’t occur.
If Optimise Mac Storage is turned on, only those files and folders that are stored locally will be backed up by Time Machine. To ensure an item is backed up, manually download it before the backup is made.
Restoring iCloud Drive items from a backup is simplest in the Time Machine app, but also available in the Finder, from a path equivalent to ~/Library/Mobile Documents/com~apple~CloudDocs/ in that backup.
DATALESS FILES
It's that last condition that's the most important consideration. If your Mac has Optimize Mac Storage turned off, then iCloud Drive is run as a Replicating FileProvider, where everything stored in iCloud Drive is also stored locally. In that case, all those items will be backed up by Time Machine just as they would be if kept in purely local storage.
If Optimize Mac Storage is turned on, iCloud Drive behaves as a Non-Replicating FileProvider, and some or many of the files you store in iCloud Drive may be evicted from local storage, and are then no longer available for backup. This is explained in the diagram.