Good question. It doesn’t do a great job of it, and not as easy as as well as Evernote or Apple notes, for example. But it gets closer than DEVONthink.
As ai understand it, a vault can be shared/collaborated on, with exclusions (which is opposite of what I’d like, but it gets the job done), and. And worst case, the raw files and folder structure are accessible in iCloud, and can be shared via the “Collaborate” feature on ios/MacOS.