The steps in the Apple support article below may be helpful to explain how turning off Desktop and Documents works:
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.
- From your Mac, choose Apple menu > System Preferences. Click Apple ID, then click iCloud. On macOS Mojave or earlier, choose Apple menu > System Preferences, then click iCloud.
- Next to iCloud Drive, click Options.
- Deselect Desktop & Documents Folders.
- Click Done.
When you turn on Desktop & Documents Folders, your Desktop folder and Documents folder are stored in iCloud Drive. This lets you access the files from your Mac on all your devices.
support.apple.com