Abdullah bin Abbas reported,

Some people used to question the Messenger of Allah ﷺ mockingly. One man would ask, "Who is my father?" Another, whose camel had wandered off, would ask, "Where is my camel?" So Allah revealed concerning them this verse, "You who believe, do not ask about things which, if shown to you, would distress you" [Maidah 5:101], until the end of the entire verse.

Azami 12292

Sahih

عن ابن عباس قال

كان قوم يسألون رسول الله ﷺ استهزاء. فيقول الرجل: من أبي؟ ويقول الرجل تضل ناقته: أين ناقتي؟ فأنزل الله فيهم هذه الآية {يايها الذين امنوا لا تسألوا عن اشيآء ان تبد لكم تسؤكم}. حتى فرغ من الآية كلها.

الأعظمي 12292صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "What is above it. As for those who believe, they know that it is the truth from their Lord. But as for those who disbelieve, they say, 'What did Allah intend by this as an example?' He misleads"
Numbering
Jami al-Kamil 12292 (2nd edition)
Azami 12292