Question: Where did religion originate from?

The Srimad Bhagavata Purana describes the origin of religion as follows:

dharmam tu sakshad bhagavat-pranitam

“True religion (dharma) is enacted directly by God.”

Thus it becomes impossible to trace out the history of religion based on archaeological or anthropological evidence. Since God is beyond the perception of the material senses, it is impossible to try to study or measure Him based on matter.

The Vedic texts, which are the basis of religion (dharma), exist eternally in the ethereal space. Through meditation one can begin to hear the recitation of vedic mantras everywhere. The vedic mantras are the foundation of matter. If you can trace out the origin of matter, you will be close to the origin of religion.

If you look for the origin of religion based on modern concepts of history you will fail in your attempt. Though you may come to a conclusion, it will not be based on knowledge (vidya), and thus such an endeavour is ultimately a waste.