Anas (RAA) narrated that Allah's Messenger (ﷺ) said:
"Keeping silent is considered as (an act of`) wisdom, but very few practice it." Related by Al-Baihaqi in his book Shu'ab al-Iman with a weak chain of narrators. The sound view is that it is traced back to one of the companions who quoted it from Luqman Al-Hakim. (ID)
English reference (ID): Book 16, Hadith 1521 (ID)
Arabic reference (ID): Book 16, Hadith 1478 (ID)