People created religions to help them get through the difficulties of life - How to answer a friend?
You need to gently point out to your friend that human beings did not create religion. Rather, religion is a virtue quite distinct from the supernatural virtue of faith. See here for more info: https://www.catholic.com/encyclopedia/virtue-of-religion
Also, you’re friend may be confusing Religion with Religious Experience, which is “any subjective state suggesting to the individual the presence or action of the divine or transcendent reality.” (pg.151 A Still Small Voice by Fr. Benedict Groeschel, C.F.R.) Once again, the two are not the same.
Religion is simply a part of human nature, and is one of those attributes that differentiate us from other living creatures. It’s not something we created. It has to do with our relationship with God (or with what we perceive to be God) and what must be rendered properly to Him. You can try to eliminate religion from existence (like the communists have tried), but human nature will always resurrect it in some form or another. Why? Because humankind is by his very nature inclined to search for God, and that inclination necessitates the virtue of religion. What often happens is that humans will sometimes substitute other things (idols) for the one true God. Idolatry ultimately comes about from the worship of oneself, which never brings us happiness. So, idolatry ends up being a dead end. We are created beings in search of our creator: the one who created all things.
Not sure how much more is needed to answer the question. Every philosopher through the ages has acknowledged the human inclination to search for the ultimate happiness which is God. In a sense, your friends statement is true, but somehow I don’t think he is attempting to make a deep philosophical statement. His statement is somewhat illogical in that it attempts to substitute humanity for God. It is true that people search for happiness because their lives are difficult. Difficulty in life is another fact of the human existence that none of us can escape (Thank Jesus Christ for showing us a way to unite our sufferings to His passion and death on the cross.) The search for happiness leads to the search for the ultimate happiness, which is God. Hence, the virtue of religion comes about from a need to render unto God what is just.
I want to say… and this is very important… pray for you friend and let God’s grace convert him. Don’t try to win him over with logical arguments if he or she is not prepared to hear them. Just gently steer him in the right direction when you can. For you own peace of mind, try to understand the truth the best you can for the time when you might be called upon to give the answer.