Sahih Muslim 1337 b
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَا نَهَيْتُكُمْ عَنْهُ فَاجْتَنِبُوهُ وَمَا أَمَرْتُكُمْ بِهِ فَافْعَلُوا مِنْهُ مَا اسْتَطَعْتُمْ فَإِنَّمَا أَهْلَكَ الَّذِينَ مِنْ قَبْلِكُمْ كَثْرَةُ مَسَائِلِهِمْ وَاخْتِلاَفُهُمْ عَلَى أَنْبِيَائِهِمْ "
Abu Huraira reported that he heard Allah's Messenger (ﷺ) as saying:
Avoid that which I forbid you to do and do that which I command you to do to the best of your capacity. Verily the people before you went to their doom because they had put too many questions to their Prophets and then disagreed with their teachings.
Full reference and source
Sahih Muslim 1337 b In-book : Book 43, Hadith 171 USC-MSA web (English) : Book 30, Hadith 5818 (deprecated)
View source on Sunnah.com (opens in a new tab)