God as an old explanation
Once, gods were the best explanations of many things.
One could say “It rains because God wants it so”. Today we know that rain is steam that has become water again and falls down to earth as drops.
The more we understand how the world works, the less we have had to use gods as an explanation.
There are still those who believe in gods because they think that this provides good explanations for how the world works. But now we have better explanations.