You need to turn the iCloud Desktop and Documents off, then your files stay in iCloud Drive and a new Desktop and Documents folders can be 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.
Step 1: From your Mac, choose Apple menu > System Settings. In macOS Monterey or earlier, choose Apple menu > System Preferences.
Step 2: Click Apple ID, then click iCloud.
Step 3: Under Apps Using iCloud, click iCloud Drive.
Step 4: Turn off Desktop & Documents Folders.
Step 5: Click Done.