Sure Al-Qasas

28:78

قَالَ إِنَّمَآ أُوتِيتُهُۥ عَلَىٰ عِلْمٍ عِندِىٓ ۚ أَوَلَمْ يَعْلَمْ أَنَّ ٱللَّهَ قَدْ أَهْلَكَ مِن قَبْلِهِۦ مِنَ ٱلْقُرُونِ مَنْ هُوَ أَشَدُّ مِنْهُ قُوَّةًۭ وَأَكْثَرُ جَمْعًۭا ۚ وَلَا يُسْـَٔلُ عَن ذُنُوبِهِمُ ٱلْمُجْرِمُونَ

Er sagte: "Es ist mir nur gegeben worden aufgrund von Wissen, das ich besitze." Wußte er denn nicht, daß Allah bereits vor ihm solche Geschlechter vernichtet hatte, die eine stärkere Kraft als er besaßen und eine größere Ansammlung (an Helfern) hatten? Und die Übeltäter werden nicht nach ihren Sünden befragt.

Tafsir 28:78

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.