Your local instance search will return communities from other instances if somebody on your instance already subscribes to them.
As others already pointed out, search for the whole URL otherwise.
It’s how Lemmy works: Your instance can only search what it knows.
It didn’t use to be like that.
Maybe I misunderstand something here, but this was always the case.
Searching is local instance only by design. Use this to search over multiple instances.
You can search for communities with https://browse.feddit.de/ .
For Rimworld I found: https://lemmy.world/c/rimworld