He said, "I was only given it because of knowledge I have." Did he not know that Allāh had destroyed before him of generations those who were greater than him in power and greater in accumulation [of wealth]? But the criminals, about their sins, will not be asked.1
Translation: Saheeh International (English)
1 There will be no need to enumerate their sins separately, as their quantity is obvious and more than sufficient to warrant punishment in Hell.
Qarun said: “I have only been given this wealth because of the knowledge and power I have, so I am deserving of that”. Did Qarun not know that Allah had destroyed nations before him who were stronger and who had gathered more wealth? But there power or wealth did not benefit them. On the Day of Judgment, the wrongdoers will not be interrogated about their sins due to Allah's complete knowledge of them and any questioning they will face is for reprimand and censure.