If you’re really interested in an answer and not only trying to dunk on religious people: I’d suggest reading a few philosophical critics of religion. Like Feuerbach and Marx.
Religion always fulfilled a certain function to people. Way back, it was used to answer questions which have been properly answered by science (where does the sun/thunder and lightning come from, etc.). But that’s not the whole picture of religion’s function in society.
People still have an urge to answer questions science can’t/won’t answer (what is right and wrong? *why are we here? how should we treat each other?). Religion fulfills the function answering a subset of these questions.