The God of the universe including this physical earth is God almighty. However, dominion of the earth is given over to men:
Genesis 1:26 King James Version (KJV)
26 And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth.
Unfortunately, the first man allowed sin to enter the world:
Romans 5:12 King James Version (KJV)
12 Wherefore, as by one man sin entered into the world, and death by sin; and so death passed upon all men, for that all have sinned:
Man was cut off from God’s protection due to Adam’s sin and satan was able to corrupt the people of this world:
Genesis 6:12 King James Version (KJV)
And God looked upon the earth, and, behold, it was corrupt; for all flesh had corrupted his way upon the earth.
Ever since Adam’s fall, satan has been the god of the people on earth and they did not choose to turn to the real God:
2 Corinthians 4:4 King James Version (KJV)
4 In whom the god of this world hath blinded the minds of them which believe not, lest the light of the glorious gospel of Christ, who is the image of God, should shine unto them.
Why? Because most men are children of disobedience. They are consumed by the lusts of their flesh.
Ephesians 2:1-3 King James Version (KJV)
2 And you hath he quickened, who were dead in trespasses and sins;
2 Wherein in time past ye walked according to the course of this world, according to the prince of the power of the air, the spirit that now worketh in the children of disobedience:
3 Among whom also we all had our conversation in times past in the lusts of our flesh, fulfilling the desires of the flesh and of the mind; and were by nature the children of wrath, even as others.
Men loved the darkness more than light:
John 3:19 King James Version (KJV)
19 And this is the condemnation, that light is come into the world, and men loved darkness rather than light, because their deeds were evil.
That’s how satan became the ruler of this world. When the people of this world are judged, so then will the prince of this world be cast out:
John 12:31 King James Version (KJV)
31 Now is the judgment of this world: now shall the prince of this world be cast out.
God is the God of the universe including the earth but dominion over this earth was given over to man. Because men chose to be disobedient and to pursue lustful desires they rejected God’s ways and satan effectively became their god or ruler, because satan’s motto is “Don’t obey God. Do as thou wilt.”
It’s easy to follow satan and difficult to follow God. So by default, satan became the god of the people of earth because men loved darkness rather than light.