Oliver105Yes, I have moved all my files from OneDrive to iCloud and now have deleted the OneDrive sync app completely from my machine. Here are (roughly) the steps I took:
1. Restored my files in the OneDrive folder from BEFORE the disastrous OneDrive update to a location on my local machine. Luckily I remembered when my machine and filesystem went haywire from the OneDrive update to version 22.x. I selected a TimeMachine snapshot from a couple of hours before that.
2. Once the Time Machine restore was complete onto my local drive, I used DirEqual.app (available in the AppStore) to compare the restored files to the v 22.x OneDrive folders in the File Provider framework. This amazingly worked, although it took some time because it was clear that OneDrive was downloading the files to do the file compare. There were a few files that were missing from my TimeMachine backup (corrupted by OneDrive sync? I don't know) and I copied over from OneDrive to the restored Time Machine folder.
3. Once I was reasonably confident that all my files were there on my local machine, I deleted the OneDrive sync app completely from my machine. There are a few steps required, Google "how to delete OneDrive app macos" to get all the details. Do NOT delete the OneDrive folders on your machine yet.
4. I then moved my restored files on my local drive to the iCloud Drive folder (into the iCloud Drive | Documents folder), and turned on Desktop and Documents in "Store in iCloud" (Apple Menu | About this Mac | Storage | Manage.... (button next to your main local drive)
5. Once the iCloud sync was complete (which can take some time) I went into the new OneDrive folder in Finder (in the new location as a result of v22.x). You will get a message that OneDrive app is not found is the upper left of Finder, and a button on upper right of the Finder window saying something like "Delete OneDrive folders". This will delete all the cached (or not cached!) folders on your machine from their new FileProvider locations.
6. I think the OneDrive folders and files still take up space on your local drive, but they may be purged in the future. I don't know. Either way, you will no longer be able to access the OneDrive files and folders on your local machine. The files previously synced to OneDrive cloud will still be there in the cloud, but they will no longer sync with your machine because the OneDrive sync app is gone.
Good luck.