So, that works in a funny way, and this is one of the quirks that belong to the current state of the fediverse. I see you are on lemmy.world, so you should not be impacted that much by it, but still... Let me explain.
You can easily search for all communities in lemmy.world (your "home" instance) by switching the toggle in your search screen. By default, you can't search for communities on other instances, UNLESS someone on lemmy.world has already done so (or, I'm not sure about this one, is subscribed to that community). If you do so, lemmy.world will federate with that community and keep it "in the loop".
If you should stumble on a community that you want to subscribe to, but it is not yet federated by lemmy.world, you can just use [!communityname@instancename.ltd](/c/communityname@instancename.ltd)
to search for it. The search takes some time, or you need to try a second time. If you subscribe, that community will be federated with your home server.
Not that big of a deal for instances like lemmy.world as I said, but a bigger thing for small instances (like my own).