The U Curve probably correlates with midlife crises being that being at the low of the U curve with some other push triggers a crises. But yeah religiosity does correlate positively with happiness (no surprise there - you offload existential worries for religious dogma)
https://www.frontiersin.org/articles/10.3389/fpsyg.2022.8376...