I’m not amazingly fond of Gould’s “two magesteria” idea (the bell curves overlap more than he’d like to admit), but:
religion is not and never really has been primarily concerned with how. It’s larger concern is why, and even more than that, given existence: how then should we live?.
Since “religion” seems to be shorthand for “the religions of abraham” in common discourse, it’s worth noting that, e. g., Genesis was not written as a text on cosmology. It’s a text on ethics, and to a fairly large extent, it’s also a ~5th century BCE political document. To willfully read it “literally” is just wrong-footed, though it’s very common among christian fundamentalists and new atheists alike.