Religion doesn’t just provide social safety net which elicits comfort; on the personal level, the act of praying and meditating provides some comfort to the individual.
I wasn’t talking about social safety nets. My point is that, for example, children usually feel better when their parents are around than when they are not. If religion is an extension of this hierarchy and “parentage” in a broader sense, praying is essentially the same - seeking closeness to the “parent” role, i.e. gods.