If the Desktop & Document option for iCloud Drive is turned on, those folders are moved from the Home folder on your Mac to the iCloud section of the Finder sidebar.
If you want to turn off the Desktop & Documents option of iCloud Drive, see the following from Add your Desktop and Documents files to iCloud Drive - Apple Support
Turn off Desktop and Documents
- From your Mac, choose Apple menu > System Settings. In macOS Monterey or earlier, choose Apple menu > System Preferences.
- Click Apple ID, then click iCloud.
- Next to iCloud Drive, click Options.
- Deselect Desktop & Documents Folders.
- Click Done.
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.