Sahih Muslim 2358 a
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِنَّ أَعْظَمَ الْمُسْلِمِينَ فِي الْمُسْلِمِينَ جُرْمًا مَنْ سَأَلَ عَنْ شَىْءٍ لَمْ يُحَرَّمْ عَلَى الْمُسْلِمِينَ فَحُرِّمَ عَلَيْهِمْ مِنْ أَجْلِ مَسْأَلَتِهِ "
Amir b. Sa'd reported on the authority of his father that Allah's Messenger (ﷺ) said:
The greatest sinner amongst the Muslims is one who asked about a thing (from Allah's Apostle) which had not been forbidden for the Muslims and it was forbidden for them because of his persistently asking about it.
Full reference and source
Sahih Muslim 2358 a In-book : Book 43, Hadith 174 USC-MSA web (English) : Book 30, Hadith 5821 (deprecated)
View source on Sunnah.com (opens in a new tab)