Why do people believe in religion?

Religious propaganda: people can go to heaven after death, or live forever, or be reincarnated in the afterlife, which has certain temptation to people's thoughts. But in real life, some people are always very upset and depressed, and want to get rid of it, so they want to seek the protection of the gods, so some people will believe in religion, of course, there are other reasons. I hope my answer will satisfy you.