Brains are glorified pattern matchers, but we hadn't yet figured out how to judge the quality of a perceived pattern, so in a desperate fit of apophenia, religions naturally emerged. Eventually we stepped back and developed systematic ways of distinguishing good patterns from bad. We call this system science.
Edison said, "I didn't fail. I just found 2,000 ways not to make a lightbulb; I only needed to find one way to make it work." I see the thousands of religions that humans have come up with as those 2,000 non-light bulbs, and science as the one method that works. Now that we have a working light bulb, we can throw out those other attempts.
I'm also curious why you believe evolution to be a metaphysical concept. From my POV you're introducing unnecessary, loaded terms like "religion" to explain phenomena that are already explained without them.
"Religion" is much more than "just the word for the collection of knowledge about how the society should operate". Maybe "ethics" is a better term for that? Religion is a very loaded term. The history of religion represents an ecosystem of competing industries vying for power over each other. I agree that religion has been used as a tool to influence the behavior of human society for both good and bad, but so has advertising and marketing (bacon for breakfast, diamonds for wedding bands, KFC for Christmas, etc.). Does that make advertising religion? Is religion a form of advertising? Or are they both just superfluous terms for something more simple: evolution.
To say there are smarter options now is different from saying it didn't work then. Getting illiterate people to gather for a sermon where they could be told to avoid shellfish that could kill them and to avoid harming other people (because an invisible wrathful being would catch them even if the society they lived in did not) served a purpose then that we have developed better systems for since.