The 9th of the 42 hadiths gathered by Imam Yahya ibn Sharaf an-Nawawi in An-Nawawi's Forty Hadith, given below in the original Arabic with an English translation and its reference.
On the authority of Abu Hurayrah (ra): I heard the Messenger of Allah (ﷺ) say, “What I have forbidden for you, avoid. What I have ordered you [to do], do as much of it as you can. For verily, it was only the excessive questioning and their disagreeing with their Prophets that destroyed [the nations] who were before you.” [Bukhari & Muslim]
Sunni collections: text from the open hadith-api dataset. Al-Kafi: Arabic text, Muhammad Sarwar's translation and gradings from Thaqalayn.net via the Thaqalayn API. Hadith numbering follows those editions and can differ from a printed copy — check the Arabic against a trusted edition before relying on a reference.