Turn off Apple menu > System Preferences > Apple ID > iCloud (in Preferences sidebar) > Optimize Mac Storage.
Allow some time for all optimized files to download.
If you are only using iCloud Drive (without the Desktop and Documents option) go to Finder and drag the files from the iCloud Drive folder (Finder "Go" menu > iCloud Drive) to another folder.
If you are using the Desktop & Documents option, see the following from Add your Desktop and Documents files to iCloud Drive - Apple Support
What happens when you turn off iCloud Drive or sign out of iCloud
If you turn off iCloud Drive or sign out of iCloud, a new Desktop and Documents folder is created in your home folder. You also have the option to keep a local copy of your files that are in iCloud Drive. If you keep a local copy of your files in iCloud Drive, they're copied to a folder called iCloud Drive (Archive) in your home folder. You can move any files that were in your iCloud Desktop and Documents to your new local Desktop and Documents.
or if you want to leave iCloud Drive turned on but want to only turn off Desktop & Documents, see the following from the same source:
What happens when you turn off Desktop and Documents
When you turn off Desktop & Documents Folders, your files stay in iCloud Drive and a new Desktop and Documents folder is created on your Mac in the home folder. You can move files from iCloud Drive to your Mac as you need them, or select all of your files and drag them to the place you want to keep them.