Az-Zumar • EN-AL-JALALAYN
﴿ فَإِذَا مَسَّ ٱلْإِنسَٰنَ ضُرٌّۭ دَعَانَا ثُمَّ إِذَا خَوَّلْنَٰهُ نِعْمَةًۭ مِّنَّا قَالَ إِنَّمَآ أُوتِيتُهُۥ عَلَىٰ عِلْمٍۭ ۚ بَلْ هِىَ فِتْنَةٌۭ وَلَٰكِنَّ أَكْثَرَهُمْ لَا يَعْلَمُونَ ﴾
“NOW [thus it is:] when affliction befalls man, he cries out unto Us for help; but when We bestow upon him a boon by Our grace, he says [to himself], “I have been given [all] this by virtue of [my own] wisdom!” Nay, this [bestowal of grace] is a trial: but most of them understand it not!”
So when some distress befalls man al-insān here a generic he supplicates Us. Then when We bestow on him a grace from Us he says ‘I was given it merely by force of knowledge’ from God that I was deserving of it. Nay but it this saying is a trial a test by which servants are tested. But most of them do not know that such bestowal of grace is a way of drawing them on and a test of their faith.