Of course there is a magical being in the sky who gives us life. Not something you’ll hear often from an atheist.
But we figured it out tens of thousands of years ago. At some point, human beings developed enough intelligence to notice that something in the sky gave us life. They could even see it. A yellow circle.
When it was around, it gave warmth and light. Two things essential to survival (yes, light included, because we depend on eyesight to find food and avoid predators).
But it wasn’t always there. Sometimes it would be obscured by clouds, and cold rain would fall from the sky. Humans were worried on those days. Perhaps they were superstitious, thinking they had done something to upset the magical yellow circle in the sky.
They would have loved to have known more about it, but they didn’t have a way to learn. So they prayed to it to always be there for them, and even sacrificed to it. They argued over which acts angered the circle, and in groups decided what not to do, for of course, the circle was always watching them from the sky.
For ages these practices continued. Many peoples started worshiping other natural elements, like rain for crops, and wind for calm seas. They had no idea why these things happened. They were like magic, and if prayer made a difference, even for peace of mind, what was the harm in that?
Eventually, humans did figure out how to learn about these “magics”. We learned that the sun is a ball of fire, it comes and goes by the rotation of the earth, and about its effects of heat and light and even vitamin D. We learned what causes wind, about the water cycle that causes rain, why we have seasons, what makes certain plants grow, and many more things. These discoveries fall under the umbrella of “science”.
But by then, worship of the circle in the sky and other natural beings had taken other forms, as mythology evolved. Mystical forces were called “gods”. Some were anthropomorphized; others had the forms of animals. Great stories were written about these deities, and groups argued and fought with others who believed in different gods, just like how people would have argued over how to please (and not to anger) the all-powerful sun for giving us life, which is itself related to different systems of morals and ethics and lists of what thou shalt not do. Peoples’ superstitions remained with us, and though sacrifice is uncommon, prayer is a daily part of life for many people.
I believe this is how religion developed.