Thabit reported,

Anas said, "We were forbidden in the Quran from asking the Messenger of Allah ﷺ about anything," and he related the hadith in the same manner.

Muslim 103

Sahih

حدثني عبد الله بن هاشم العبدي حدثنا بهز حدثنا سليمان بن المغيرة

عن ثابت قال

قال أنس كنا نهينا في القرآن أن نسأل رسول الله ﷺ عن شيء وساق الحديث بمثله

مسلم 103صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Faith
Chapter
Asking about the pillars of Islam
Numbering
Darussalam 103
Muslim 103