As @JBH has already mentioned World Anvil (great software, used it for a few things myself); I'll list a few other options I've used over the years (one currently):
I currently use Office 365 with OneNote for collaborating with others on research papers & know that several of them use it for writing and/or worldbuilding as well. It offers a lot of features (and offline capabilities), is usable on tablets & phones (draw diagrams regularly), and all the other basic note-taking & organizing capabilities. It is not focused on Worldbuilding but on generic note taking and is not free
Now Notion is free for the basic usage (which includes offline & private capabilities) but I would recommend at least the $4 a month version for the advance permissions if you really want to collaborate (control more than "all private" or "all public"). This one, I have not used much at all but know it includes full Android & iOS versions and allowed me to do all the things I did with OneNote but with a steeper learning curve.
Once again, Scabard is free but for the fully private mode you will need to buy the $40 yearly subscription (making it the cheapest private version I've found). The free version allows you to set certain items as "not viewable by players" but not everything and you cannot make secret pages. This is geared (heavily) towards RPG & TableTop campaigns but I've used it for general Worldbuilding too. It offers: Map creation, Timelines, Event handling, Character/Group/Item/Location creation options, and graph options for seeing connections. This is my absolute favorite tool for RPGs and is awesome for any world/story which you need to build as well.