This is the response I sent to an exmormon friend who thought that the benefits of religion was merely the "social aspects" after I had sent him the 2019 article Religion's Relationship to Happiness, Civic Engagement and Health | Pew Research Center" . My response was as follows:
The social part is key indeed as we are social mammals. However, the last few years I have read several books by scientists who happened to be atheist who do not go to church yet they readily acknowledge that we are not Homorational like Spock in Star Trek but we are Homoreligious. They argue that we evolved to be religious. Experts on the subject call it things like culture-gene co-evolution. In other words religious culture and our genes evolved together and are intertwined.
I'm not saying that everyone should to go to church, some of us are more left-brained and hyper analytical; but most people I think benefit from religious mythologies. This is why when we were kids Star Wars became so popular because it was essentially a religious mythology that was replacing the churches that had previously provided a mythos for most Americans.
If you want evidence of what I am talking about there is a talk by a hardcore atheist who gave a talk to a group of Jewish people on how their religion actually makes them healthier and happier. See:
https://youtu.be/8BwGxji6Agw
It is not just the fact that Jews get together to socialize but it is their mythology and rituals which generates the well-being, happiness and health benefits. He demonstrates this at the 44 to 51 minute mark, give it a watch through the link above to see what I'm talking about. If you're patient enough watch the whole lecture.
I experienced this myself as a teenager when I was having panic attacks, going to church and listening to the hymns and being part of the group and participating in the shared ritual and mythos reduced my anxiousness and panic attacks. Also, after almost two decades holding a non-theistic worldview, I was never able to fully resolve the feeling of a lack of a higher meaning I often felt with the cynical atheistic frame of mind. But in the last few years I have began playing around with the idea of believing in a "higher power" and a higher "meaning in life," which has provided me a cosmic significance, a sense of my intrinsic worth in the cosmos as a "soul" so to speak. After simply opening my mind to these ideas psychologically, as a psychological experiment and simply allowing myself to entertain these metaphysical ideas and concepts experimentally, even if I'm not taking them literally but treating it as a psychological experiment, that I have Cosmic Worth as a soul and am part of a "spiritual" Cosmic Plan and my life has meaning, I began to realize and notice my overall mood had improved for the better. I found myself at least 40% happier, on some days 80% happier.
Also see this short three-minute clip by an atheist defending religion on scientific grounds:
So it's just something to think about is all I am saying. We can be hyper analytical and skeptical, debunking and nitpicking religion (which I am good at and have done my share of), or we can be more focused on the pragmatic benefits of religious ideas. We can look at what many scientists are now saying more than ever about what is beneficial about religion to our overall health and well-being.
For myself, I'm less interested in whether or not religion is true or false as in wether the stories literally happened (as if religious scriptures were a science textbook, which I don't think they are), or whether a ritual is actually supernaturally effective. Instead, I'm more interested in the metaphorical and ethical message of the stories; and the psychological impact of the religious rituals and practices on my psyche and physiology. I now find myself more often asking questions like: Is it useful for uplifting and inspiring myself and others and/or creating greater group cohesion? Is it pragmatically beneficial to my well-being and confidence and the self-esteem of others?