Most likely the first human who invented the first god was some smart tribal guy who saw that it was a very effective way to protect himself from bodily harm by the stronger ones if he made them and the less smart members of his tribe believe he had a very strong friend living across the mountains.
A friend so strong that he could make the mountains rumble by stamping his feet on the ground.Others would not dare to attack him fearing the revenge of such a powerful friend and even though no one ever saw this friend it was better to be safe than sorry.
It probably did not take long for this smart guy to discover that his fellow tribesmen were easily led to believe that this thunder ally would make them nearly invincible in battle with rivaling tribes and could even conquer these tribes.
The smart guy was well aware that in reality he was not safe at all so he turned to the strongest one around,usually the tribe leader and made him believe that he was favored by the mighty thunder-friend across the mountains.
Of course the strong friend story was revised when people could cross the mountain and were likely to find nothing there.As time passed the powerful friend moved to a place where no man could travel,places like in the sky,the deepest sea,or the top of unclimbable mountains.
Religion became the most powerful way of making people compliant and even the Roman Empire saw that its culture of countless god families would not work if they wanted to maintain power over Europe.
In the 4th century Emperor Constantine the Great started a change when he decided to go for a new approach that seemed to work in the eastern territories so he threw out the old God families with their immensely complex mythical stories and started simplifying things by adopting the one single god of the Jewish culture combined with folklore about a prophet who claimed to have been the son of this Jewish god;this was a wise decision because in this way he would not cross the Jews,who he saw as a nuisance and wished he could get rid of.
He appointed a group of smart guys,that you will find in any era,and gave them the task of creating this system of a Father,a Son and a Mother who was chosen to bear this son of God,Jesus.
These smart guys of course were the Council of Nicaea that was well aware that creating a whole religion from scratch would cost decades unless they joined together old Chronicles with scriptures mostly taken from the Jewish Talmud and combined that with the new story of the prophet,Jesus son of god,in the one book that would be the guideline of the new roman religion Christianity for the future.
This compromise was created in much shorter time,and there were bound to be errors in the bible because there wasn't enough time to cross reference the books that were included.Taking the fact that no one could read anyway and the sermons would be given in Latin these errors would not show for another millennium.
To make a big leap forward,Christianity in the form of Roman Catholicity spread across Europe and later the world in a bloody,merciless often genocidal way.Like in prehistoric times,Rulers and Priests joined forces to keep their people compliant;and a perfect example is,as the cardinal said to the king,"if you keep them poor,I will keep them ignorant".
Painting of King Henry VIII and Cardinal Wolsey
Even today historians are still arguing about the historicity of this statement but it gives a good image of the religious system of keeping people compliant and not turning against the ruling class.At the same time it shows how well indoctrinated compliant people could be manipulated into fighting their wars,all in the name of God and King.
To the Kings,Emperors yet to come were given the forces of church and religion,a weapon of almost unlimited numbers of subjects ready to fight their wars and to expand their illusion of power that in reality was in the hands of the smart guys behind religion.
Rulers would eventually die and could be replaced while religion kept expanding its power and influence.
All throughout history religion has been used as the most powerful weapon of genocide and destruction known to mankind.
This went perfect until the time of enlightenment when in spite of the efforts of religion to keep them ignorant,people started to think for themselves and discovered that they were being used and started rising up to the power of these Kings and other rulers,but still in the way religion had taught them,now it became"for God and Country".
In the time of modernization,and especially the 20th century,all religions began to lose their grip on the people when more and more people left the church because they became educated and aware that they were being manipulated.The time without god was born,at least in western Europe where the average person currently identifies themselves as atheist,no longer believing in a god presented by the church.
Don't think the religious weapon has lost it's power.Islam has gained more power in the past 5 decades than in centuries before;they know how to use the two pillars of religion,poverty and ignorance to organize people into a formidable strike weapon against its"enemies";and Christianity only has minimal loss in this.
Same thing happened in the USA.
Because the ruling class were not Kings or Emperors,religion has found other ways to ensure its power by giving aid to the rich who can control politics just with their money.
But religion is encountering a snag,for the first time it is feeling losses in the number of followers it can control,because more and more people are becoming educated and skeptical about this whole religious thing.
One of the pillars of religion,ignorance is rotting away.These past decades the rich and powerful have been very active to enrich themselves and keep the people poor.This is not enough,to keep its power religion also needs that other leg to stand on.To regain this,it is of absolute necessity to return the people back to compliant ignorance and bring a stop to this threat of education.
Religion realizes all too well that to reverse it back to illiteracy is no longer possible,so the smart guys are now actively doing what they do best,manipulating circumstances in their favor,and therefore they need to control education to the advantage of their religion.
I think the only proof I need to present that this is all happening is to urge you to look at the rise of creationist dogma in education by getting religious people into key positions in the educational system.
For the religious weapon to survive it needs an increasing number of blind ignorant followers.The religious weapon keeps totalitarian regimes in power,and together they keep the majority of the people in the world poor and ignorant.
But now instead of kings and emperors this power is given to the rich who can use their fortune to buy their way into decision making politics while the"peasants"are going to church every Sunday and send their children to church dominated schools to make sure they receive their daily dose of brainwashing.
It is time for this weapon to be dismantled to stop this madness.
Don't you agree?