Some people say awe is a prerequisite for a religious experience. Awe might be bliss or it might be terror, but it's the same as not knowing what's going on. So we ask someone and pretty soon find out the world was created by a super being who's sort of like us but knows and does everything. So they say, and it puts some kind of handle on it. We can't argue because honestly we just admitted that we don't know.
Religion brings positive evolutionary benefits by exchanging information between people. The information can easily be bull, but sometimes it's verifiably true. For example, by the above definition, Science is a religion too.
The net result is that the individual gets what seems like a satisfactory answer from someone else and is forced to admit that there is a system of knowledge beyond himself (Donald Trump excepted of course). Then, being a part of the whole instead of the whole, the individual extends self preservation benefits to the group which amounts to self sacrifice and altruism. Bad for the individual but good for the group. The group is the larger self, a super being.
How superstitions spread (sciencedaily.com) Just take my word for it.