I'm an atheist. I don't mean that I believe there is no supernatural. It's that I believe there is no supernatural worth paying any attention to. Our world and our selves are governed by the laws of nature, and we have no afterlife. If there are supernatural beings, it's unlikely they care about our individual futures, and it's likely they're unaware of us altogether.
However, lots of people believe in God, and pray to God. And sometimes, to some extent, it works. There are many real things that are actually responsible for what God appears to do. Here's an incomplete list:
The laws of nature are truly wonderful things. The universe doesn't care if you succeed, and doesn't care if you fail, but it does follow rules. If you arrange things so that the laws of nature work in your favor, you can predictably succeed. That's how automobiles run. "God helps those who help themselves" is typical advice for dealing with this aspect of God. This aspect of God truly is universal and omnipotent. It really did create the heavens and the earth, and really did create mankind (through the process of evolution). Praying to this aspect of God makes no difference whatsoever, except to the extent that it causes you to think and plan and act. Are the laws of nature due to some actual god? Maybe, maybe not. It doesn't matter. Either way, it's irrelevant, because it's only the laws themselves that affect us.
Community support and peer pressure are very human things. This aspect of God varies by place and time: in Oklahoma today this aspect of God is quite against abortion, and in Afghanistan today this aspect of God requires women to cover their faces in public. You should be respectful in churches because of this aspect of God: it is literally respecting the local community. This aspect of God did not create the heavens or the earth or mankind. Praying silently to this aspect of God is of no use, but praying out loud among other believers helps. You can make this aspect of God stronger by helping answer the prayers of other believers, and calling out others on their immoral behavior, however you define immoral. Because that's all there is to this aspect of God in the first place.
Opportunity could be viewed as just part of the laws of nature, but you deal with this aspect of God differently. The trick is to plan ahead and be alert and ready to act on the spur of the moment. "Opportunity knocks once", "when the world give you lemons make lemonade", and "chance favors the prepared mind" are quotes about how to deal with this aspect of God. Both thinking and praying out loud in public help. Praying in public can persuade others to point out opportunities to you.
Organized religion is the aspect of God who wrote the bible, who requires you to tithe, who is a jealous god, who wants all US Christians to vote Republican, et cetera. It is a multilevel marketing scheme. It does not really care about helping you, or morality. It is all about keeping itself going. It cares a lot about its bank account. It is a meme, a thought virus. It succeeds in paying for church buildings and helps in bringing the congregation together regularly.
Holy texts are often chosen by organized religion. They were originally written by men, the way any history or story is written ... either they remember things, or they make things up, or they construct a line of reasoning and write it down. It's never a stone pre-formed by God with the words written on it. I've written short stories myself, some histories, some complete fabrications, some in between. The written word is not magical.
Holy texts often reflect the local-community aspect of God at the time and place they were written. This aspect of God differs almost arbitrarily across time and space, so there are glaring inconsistencies (like the vengeful jealous God of the old testament vs the peacenik of the new testament). Marcion of Sinope, in 144AD, codified the Christian holy texts to show that the One God of the old testament was indeed the creator of the universe, but also a deluded fool in denial of how he himself was created, and in fact the Evil Devil. Meanwhile Jesus was the son of not that God, but of a higher Good God. Marcion demonstrated this in his writings, his "antithesis", which contrasted the vengeful old-testament God against the peacenik of Jesus, saying see these can't be the same guy. Marcion got branded a heretic and there were centuries of book-burning and people-burning. It makes me smack my head and say "C'mon, guys, these are all just compelling stories, stop actually believing them." Marcion wasn't wrong about the two portrayals of God being inconsistent ... the mistake was claiming that there were consistent actual beings being described. It's natural that different communities in different times and places will have different shared morals and laws. Holy texts, by being unalterable, often run afoul of this.
My daughter points out that animals probably believe in gods too. For example, dogs probably view storms as some big angry thing. It's very easy to associate emotions with everything if your brain is designed to model the emotions of others. Dogs, being pack animals and assistants to humans, put a lot of effort into modeling the emotions of others.
Genesis says plants, including grasses, were created on day 3 and the sun and moon were created on day 4, and the earth on day 1. Science says the sun came first, then the earth, then the moon was split off from the earth, all about 4.5 billion years ago. Grasses first appeared about 66 million years ago, and flowering plants (the group containing grasses) about 200 million years ago. Plants in general die right away without sunlight. Contradiction. Can't have it both ways if the bible is literal truth from God.
The biblical record places Noah's flood at about 2348 BC. The great pyramid of Egypt was built about 200 years earlier, and Egypt has a detailed written history throughout. Can't have it both ways if the bible is literal truth from God.
Biblical history shows Adam, and the whole universe, was created 4004 BC. Written history starts around 3500 BC or so, but tree rings (dendrochronology) show weather patterns for every year back to about 13000 BC. They don't show a worldwide flood in 2348 BC either. Soil accumulates at a constant rate (usually 3 to 11 centimeters per 1000 years), and sediment layers go back billions of years. Go in your backyard and dig down a meter and (in most places) anything you find is from before 4004 BC. Dinosaur bones are from around 300 million to 67 million years ago. The middle east is covered with stone "kites" from about 9000 BC that early man used to trap animals.
In all these things I choose science over the bible, because predictions based on science come out true while predictions based on the bible often come out false. (Do men have one fewer rib than women? What do would you predict?) So I believe the bible is NOT the literal truth given by God. I think it's often wrong. Creation according to Genesis especially. I think the bible was written by humans, recording human thoughts, based on their best understanding at the time.
Why the bible would be clearly wrong now is no mystery if it was written by humans based on their best understanding at the time. How could science be always right though? Because whenever we find science is wrong, we adjust scientific theories to account for the new findings. That lets the current scientific theories always account for currently known facts. Science also often says "we don't know yet".
Perhaps early Genesis is made up by men, but the rest is the inspired word of God? I don't think so. But even if it were so: in my mind, God's claim to respect rests on early Genesis. If God didn't actually create the world or mankind or myself, but is claiming that He did anyhow, I feel no obligation to obey him.