Allah Most High says in Surah al-Mulk:
“Are you confident that the One in heaven will not cause the earth to collapse beneath you as it spins?” (Verse 16)
"The One in heaven" means Allah but that doesn't mean "Allah is in heaven." Since Allah Most High does not need space. He is the One High than space and time. According to the belief of ahl as-sunnah wa al-jama'ah, "Allah is on earth or in the sky" means that His will and judgment are the same effect to heaven or earth and He is the Conqueror.
Torment will not only be the result of the earth collapse, but also other things. The following verses are evidence for this.
“Or are you confident that the One in Heaven will not unleash against you a violent storm? Then you will know what My warning is like.” (Verse 17)
In this verse, Allah Most High reminds His servants that if He so wishes He can send a severe storm of tormen which brings small stones, as sent to the people of Lot. If He does, no one will escape. That is why the following verse reminds of the treatment of the ungrateful people who lived before:
“Those before them also denied the truth; and how was My disapproval?” (Verse 18)
In other words, previous generations also falsely accused their prophets of lying. But Allah rejected this and afflicted all sinners with various torments.
In order to attract His servants to His own power Allah urges them to think about the creation of a bird.
“Have they not seen the birds above them, spreading their wings, and folding them? None holds them except the Compassionate. He is Perceiver of everything.” (Verse 19)
Like any other creature, the bird is a vivid proof of the power of Allah Most High. Unlike other living things, it is a miracle that it flies for hours in the infinite sky. As that the verse emphasizes the bird's flight.