This phrase is repeated verbatim in two places in the Qur'ân, in slightly different contexts.
We first find it where Allah says: "Wealth and children are allurements of the life of this world: But the things that endure, good deeds, are best in the sight of your Lord for blessings, and the best things upon which to pin one's hopes." [Sûrah al-Kahf: 46]
We again find these words in the following verse: "And Allah increases in guidance those who seek guidance: and the things that endure, good deeds, are best in the sight of your Lord for blessings, and best in the returns that they ultimately yield." [Sûrah Maryam: 76]
Both verses come in the context of engaging those unbelievers who are deluded by the provisions of their worldly lives. In the first verse, the permanent blessings of our good deeds are compared with the transient blessings of worldly prosperity, represented by "wealth and children."
In the second verse, the context is similar, since it is immediately followed by the verse: "Have you then seen the sort of man who rejects Our signs, yet says: 'I shall certainly be given wealth and children'?"
In both cases, the "permanent blessings" of righteous deeds are presented in the context of wealth, children and the life of the world in general. This tells us something important. It tells us that there is no opposition between worldly prosperity and spiritual prosperity. The two forms of blessing are being compared in their degree of worth, not contrasted as opposites.
The Qur'ân and Sunnah do not teach us to forsake or disparage our worldly lives in order to attain success in the Hereafter. The tow worlds are not mutually exclusive. This is why the Qur'ân teaches us the supplication: "Our Lord! Give us the good in this world and the good of the Hereafter, and save us from the punishment of Hell."
People are not divided into those who aspire for this world and those who renounce the world to focus on the Hereafter. Not at all. Rather, the distinction is between those people who pin their hopes exclusively on their worldly existence and care nothing for the Hereafter, and those who seek the good in both.
Logic and common sense tell us that achieving the good in both this world and the Hereafter is the best possible scenario. A believer, therefore, does not renounce the world, but aspires to what is wholesome and good within it. We see that the prophets and Messengers – though they made great sacrifices, suffered rejection, and endured hardship and poverty for the sake of their faith – they were not people who lived in distress of the world. They were happy people, who were at peace with their worldly lives.
What Allah reminds us in these verses and others is that we should not get caught up in he pursuit of worldly rewards at the expense of the Hereafter. We should work for success in both, keeping in mind that the rewards of this world are transient and those of the Hereafter are eternal.
This is emphasized by the order of words in these verses. Allah says: "the things that endure, good deeds."
Allah could have said "enduring good deeds" or "good deeds that endure". Instead, Allah emphasizes the quality of permanence, drawing our attention to how it contrasts with worldly blessings like "wealth and children". Once this contrast is established strongly in our minds, we are then informed of the way we can attain these permanent blessings – by engaging in acts of righteousness.
This is powerful. Nothing causes worry for human beings more than the loss of what we have, the loss of wealth, of health, and the inevitable loss of youth. There is no stronger context, then, for us to be reminded of the enduring value of our good deeds.