The Messenger of Allah ﷺ said, "The greatest offender among the Muslims against the Muslims is one who asks about a matter that was not forbidden, and it then becomes forbidden upon the people on account of his question."
حدثنا عثمان بن أبي شيبة حدثنا سفيان عن الزهري
قال رسول الله ﷺ إن أعظم المسلمين في المسلمين جرما من سأل عن أمر لم يحرم فحرم على الناس من أجل مسألته
Muslim narrated it in the Book of Virtues, in the chapter on honoring him and refraining from excessive questioning about matters with no necessity, hadith 2358, from the hadith of Sufyan bin Uyayna. Bukhari narrated it in the Book of Adherence to the Quran and Sunnah, in the chapter on the dislike of excessive questioning and burdening oneself with what does not concern one, hadith 7289, from the hadith of Zuhri, with the same wording.