The idea of God was created by logic and by philosophical questions. I remember when i was a child, i thought "where did this world come from" "there has to be someone who has created this world". " why do i live" ," what is the purpose of my life".
Almost all humans ask those Philosopher questions. And most people come to the conclusion that God is the creator of this world. And that our life has a purpose
Most children have the answers handed to them prepackaged. They are not explained, nor are the facts and reasoning underlying them.
Of course, the children's parents haven't a clue either. They were fed the same simplistic pablum when they were kids, too.
Most parents just aren't versed in axiology, ontology or metaphysics, and certainly have little epistemic skill at assessing ideas.
Nor do most parents have the knowledge to answer these questions from a biological or cosmological perspective.
The result: "Goddidit!" -- which may be satisfying to a child's pre-intellectual mind, but really answers or explains nothing.
"Where did this world come from?" This is a physics and geology question, not a religious one.
"There has to be someone who has created this world." Why? How did you come to this conclusion?
"Why do i live?" Is this a biology question, or a question of purpose?
"
What is the purpose of my life?" Why assume any cosmic purpose at all?