The Pilgrimage - 22:48 How many a city I gave respite to its inhabitants while they were wrongdoers, and then I called them to account; to Me is the final return.
He does not punish immediately, but gives them a certain period of time to correct themselves:
The Pilgrimage/22:48 How many a city I gave respite to its inhabitants while they were wrongdoers, and then I called them to account; to Me is the final return.

The Cave/18:58 Your Lord is Forgiving, the Owner of Mercy. If He had reckoned them immediately for what they did, He would have hastened the torment for them. But He gives them a definite term, beyond which they cannot escape.

Originator/35:37 "Therein they cry out, "Our Lord, take us out so that we may do other deeds than what we used to do". Did We not make you live long enough for a person to take advice? And a warner came to you. So taste it. The wrongdoers have no helper."
Originator/35:45 Had Allah punished mankind for what they used to do, He would have left no creature on the earth. But He postpones them until a certain term. When their term is over, then Allah will take account of His servants.

Prophet Abraham/14:10 "Their messengers said: "Do you doubt Allah, Who created the heavens and the earth, and He calls you to forgive you your sins and gives you a certain period of time?"They said: "You are but men like us, and you want to turn us away from that which our forefathers used to serve. Bring us a clear authorization"."

Yaseen/36:43 If We had willed, We could have drowned them; no one would have heard their cry, nor would they have been saved.
Yaseen/36:44 Instead, they will receive mercy from Us and they will be kept alive until a certain term.

Council/42:34 Or He destroys them for what they used to do. And forgives many of them instead.