This inquiry carries the meaning of wondering and scolding to mankind who dares upon the creator by committing sins while Allah (swt) is the Generous who should not be disobeyed.
Allah (swt) talks to humanity saying (O’ Mankind) because this word implies that his humanity should prevent him from being arrogant. Humanity is distinguished by brain which is the machine of thinking, planning and deduction, whereas, arrogance is an inattentiveness of the arrogant. Hence, human should not forget his weakness and need in front of the strength of his Lord and creator, if he wants to be proud of something, let him be proud of a self-made something not of something given to him, that is why this act required the wondering and denial.
يَا أَيُّهَا الْإِنسَانُ مَا غَرَّكَ بِرَبِّكَ الْكَرِيمِ
(O Man, what has deceived you concerning your Lord, the Generous, (6))
What is the thing that prompted you to be arrogant, while, Allah (swt) is the Generous, Giver of blessings and bestowments to us!!
Allah (swt) uses here the attribute of Generous specifically to indicate that The Generous should not be met with bad deeds.
Then The Truthful (swt) counts and reminds us of some of His blessings and effects of His generosity: