See the articles Add your Desktop and Documents files to iCloud Drive - Apple Support
Find your Desktop and Documents files on all of your devices
When you add your Desktop and Documents to iCloud Drive, all of your files move to iCloud and any new files you create are automatically stored in iCloud too. Then you can find your files on all of your devices.
Your files upload to iCloud each time your device connects to the Internet. Depending on your Internet speed, the time it takes for you to see your files on your other devices might vary.
On your Mac
You can find your Desktop and Documents folders in the iCloud section of the Finder sidebar. If you add a second Mac Desktop, you can find those files in the Desktop folder in iCloud Drive. Look for a folder with the same name as your second Mac. You can also use Spotlight to search for specific file names.
Keep your files up to date and share them with iCloud Drive - Apple Support
Share and collaborate on files and folders
You can use iCloud Drive to share files and folders with friends, family and colleagues, just by sharing a link. When collaborators make changes, everyone sees those changes in real time.
If you share with someone who uses iCloud, they can add the shared file or folder to their iCloud Drive and view it on all their devices. You decide if the people you share with can edit the file or folder or just view it. You can also allow them to add other people.
You can also share a file with people who do not use iCloud. Anyone who has the link can download it. If you share a Pages, Numbers or Keynote file, you can allow anyone with the link to edit it.
Share files and folders in iCloud Drive on iCloud.com - Apple Support