Your question involves what was certainly a prehistoric process, so on one level, it may be better asked of /r/Askanthropology. Without records, it is not possible to answer your question with a historical process.
Of course, archaeologists and anthropologists cannot really answer your question either, since they also lack historical records, and they too can only speculate about how this process might have unfolded. Given hints at what appear to be references to some sort of belief system in Upper Paleolithic art but even before that with the burial practices of Neanderthals and other hominids, it is likely that belief systems about ancestors and/or other powerful supernatural beings were emerging or fully in place more than a hundred thousand years ago. No one can credibly claim to be able to peer that far back to see the nature of unrecorded belief systems. It's all a matter of guessing.
There is a hint of how easily lines can be blurred: pre-modern folklorists documented and discussed how Northern Europeans frequently conceived of the ancient dead and the indigenous fairy population as sharing many attributes and even as having a common origin. Because beliefs in pre-literate cultures are not tethered by a written text, drifting and blurring is a common phenomenon. I can imagine a situation tens of thousands of years ago when people believed in powerful supernatural beings and powerful spirits of ancestors, and I can imagine how the two flowed together sometimes and/or to a certain extent put wind in each of the sails to a certain extent.
That is speculation, and it does not speak to the point of origin - the point of your question. That religious "big bang" moment is probably more difficult to imagine than the Big Bang that started the universe. And when it comes to the point of origin of belief systems, I suspect we are talking about "diverse low-key whimpers" rather than a "big bang." In other words, I doubt there was a single moment, and I suspect hominids scattered widely began independently backing into the idea of spirituality and powerful supernatural beings. But there I go speculating again.
In other words, your question will never receive a definitive answer - no matter how fun it is to contemplate.