For example, Freud posited that religious belief was related to family dynamics and one’s relationship with one’s father as well as a delusional way to alleviate the fear of death. […] Human mental gadgets, then, almost inevitably lead to belief in supernatural agents and to narratives about them. But they do not necessarily lead to belief in the moral “Big Gods” with which we are familiar. Those gods, the powerful and morally concerned gods of Judaism, Christianity, Islam, Hinduism, et cetera, likely arose through a long process of cultural evolution because they provided groups of believers with advantages over other groups.
I’m not at all a fan of Freud’s—even less of Skinner’s behaviorism—but with respect to the “Big Gods”, perhaps there’s some validity in considering a purely psychological angle. For example, one could conjecture that the security, comfort and unconditional love that most humans enjoy in their early childhood, coupled with the perception of our parents’ being all knowing and powerful and with their constant application of rewards and punishments, might be enough to make an adult feel a painful and disconcerting void were all this not replaced with something equivalent.
As to alleviating the fear of death, it could well be that a predisposition to believe in the afterlife, which would naturally mitigate that fear, is the result of evolution. As I wrote here: … the inexorable reality of death should have been enough to plunge them into existential distress. […] One might also hypothesize that a predisposition to believe in supernatural transcendence, e.g. religion, could have evolved for this purpose too, but people who outright reject the supernatural don’t seem particularly prone to paralyzing existential crises, and religiosity continues to lose ground as societies become more educated and scientifically literate; thus the possibility that we may have an innate predisposition toward religion and the supernatural in general doesn’t seem too persuasive, although I don’t think it can be discarded; after all, even in modern industrial societies a significant number of people still believe in ghosts, astrology, immortal souls, psychics, reincarnation, and the like.