A more rigorous version of the contingency argument looks a bit like this:
P1. All physical things have a cause
P2. Mystical things may not have a cause
P3. A thing may not cause itself
D1. The world is the set of all physical things
T1[P1, D1]. The world has a cause.
T2[T1, P3, D1]. The cause of the world cannot be a physical thing.
T3[T2]. The cause of the world must be a mystical thing.
D2. We call God the mystical cause of the world.
Of course, there are plenty of reasons to reject this argument, but most versions depend on setting up a distinction between the necessary qualities of a world and a God. There are many who would reject each proposition; one logical hole is that it's not clear if D1 sets the world as a physical thing if it is not finite, since all ordinary physical things are finite.
Ok but I am not sure that people 2,500 years ago were that smart to go through a logical sequence like that. Imagine you're the father of those Jewish prostitutes portrayed in Ezekiel Chapter 23, you come home worn out by slavery and your daughters come home...like the Bible says, filled with emission from those donkey dicks and horses and whatever, come home, sit on a chair...and they leak white filth all over the place.
How do you feel? You feel powerless don't you? Your daughters are defiled, your freedom is non-existent, you own nothing you starve, and your daughters only eat emissions from men. You feel powerless! For someone like that to start putting his hopes in a higher power, it doesn't take a logical sequence lol! It is out of mere frustration for the people having more power then them!
When someone beats you up in school, first thing that comes to your mind is the Principal! Higher power to deliver you! So people started assuming that there must be a higher power who will deliver them from this miserable life. It is only natural for people to hope, but hope has to be founded on something solid and they invented God to found their hopes on.
The problem with humans of that time is that they would have pitty doing to cattle what they dared doing to other human beings. The concept of God emerged according to me to appease their recklessness and say like, ok Tommy, raping a pregnant woman, then cutting her belly open and tossing her unborn child to the dogs is bad! Bad Tommy! You should not do that!
There was also sick rituals where, if a child was born physically handicapped, they would take the child, force it back into the mother and sew the vagina so that the baby would never come out, then beat the mother on the head with stones until she died. Humans had no boundaries so they had to put a boundary to the abomination.