If you were using Time Machine (or other backup software) on your Mac while you were using iCloud Drive, any iCloud Drive files that were stored locally on your Mac would have been included in the Time Machine backup of your Mac. Note that if you didn't have the iCloud Drive Optimize Storage option turned on in your Mac note that ALL of your iCloud Drive files would have had a local copy.
Also, see all of the details of all of the sections below "Turn off Desktop and Documents" in the document Add your Desktop and Documents files to iCloud Drive - Apple Support for information about where your files and folders might be after you turned off Desktop and Documents.
Finally, there isn't Time Machine for iCloud Drive but there is a data recovery capability. I haven't tried the following after turning off the Desktop & Documents option on my Mac so don't know how that might affect it.
Use an internet browser (e.g., Safari) and log into iCloud.com.
Scroll all the way down the page (keep going down below the "Customize" button).
Click "Data Recovery"
See the "Restore Files" section.