Start with Muhammad who lived from 570 to 632 AD. There is extensive proof of his existence, but he’s relatively recent, from the early medieval period.
Before him, Jesus. There are strong indications that a Jewish rabbi of that named lived from about 6 BC – 34 AD, and was executed by the Romans. But those were turbulent times in that part of the world, with insurrections and sieges and the destruction of cities. Certainly the stories told about Jesus were reshaped by Paul with a pro-Roman bias, and some people claim there was no Jesus at all, just an amalgam of Mithraic and other myths.

Some of the religious back stories have always been really, really unlikely.
And now Moses, purported to have been the Jews tribal leader around 1500 BC, is under increasing scrutiny. His existence is questioned on the basis of the entire Jewish-Exodus-from-Egypt story being likely mythical, because there is no trace of any of it in the detailed Egyptian records we have today.
The further back in time, the more dubious the founder looks.
What about Odin? He could have been a tribal leader, bringing the Aesir through Germany into Scandinavia around 300 AD. A trickster, a shaman, a warrior, and perhaps a man who had half-learned to write on the fringes of the Roman Empire, and created a runic alphabet for his own people. Archeology will have to devise fresh tricks before we have more answers.
And Gilgamesh, searching for the secret of immortality, journeying to Dilmun to meet Utnapishtim the Faraway, the survivor of the Flood. The Persian Gulf used to be dry land right out to the Straits of Hormuz during the last Ice Age. If the land flooded by cataclysm rather than gradually, whatever proto-civilizations there were on that fertile plain would have been wiped out. Perhaps a man named Utnapishtim survived, and lived out his days in Dilmun, which the Bahrainis think is the place now known as Bahrain.
And coming back to our own time, we have to consider the new religions of Mormonism and Scientology. Clearly, Joseph Smith and L. Ron Hubbard existed. And equally clearly, the back stories to their religions were made up out of whole cloth, shared with a couple of close associates, and then used to gain access to the wealth and women among the gullible.
And they’ve grown! Mormonism has gone from zero to 14 million since 1830, and Scientology from zero to maybe 200,000 since the early 50s.
So the old religions may have come about in the same way. Yes, there was a founder. Yes, he had visions, or claimed to have visions, or just preached a good story. And a lot of what he preached, even if he made it up out of whole cloth, was believed because it proved to be something that a lot of people were comfortable believing.
And that’s how we got where we are.