Organized religion is comparatively modern. It was around 50,000 BC we were practicing Shamanism. Civilization and religion are interlinked. The more civilized you are, the more organized your religion and gods become. In the beginning we lived in tribes. So propagation of religion was out of question. So each tribe had their own symbols, Gods, omens and priests. Even today from the African Dogon tribes, Mongolian Horse riders, Bushmen from Namibia and Aborigines from Australia live this way. Shamanism and astrology were deeply connected. So we humans started a religion as soon as we started recording weather and astrological phenomena.
Then along 5000 BC Egyptian and Mesopotamian civilizations started making their own Gods and laws.
Because these were civilizations and not tribes, the religion underwent a great change.
In following centuries, Hinduism, Greek, Buddhism, Roman and Taoism etc..; were born.
These religions were endowed with written epics of Gods unlike the oral tradition of Shamanism.
But there was a monotheistic religion around 1800 BC in Iran which is the oldest Monotheistic religion. Zoroastrianism. It was followed by Jewish, Christians and Muslims later.
Religion depends on civilization. We started worship by invoking the forces of Mother Nature. Then in civilization, we needed gods of trade,war,fertility, law and education etc..; Then we felt overwhelmed or outnumbered by Gods and selected a particular God to invoke and worship.
That's the story of God and religion.
The stronger a light shines the darker are the shadows around it.