The Sims series does not have a native, real-time co-op multiplayer mode (like Minecraft or Fortnite) where you control Sims simultaneously in a shared world. However, there are specific ways to play "with" friends:
EA/Maxis has confirmed Project Rene (next-gen Sims) is being built with multiplayer/social co-op as a core pillar. No release date yet.
Summary: For now, The Sims 4 Gallery is the only official, stable way to share creations with friends. For real-time co-op, you need the PC mod (experimental) or wait for Project Rene.