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.
English reference: Book 16, Hadith 1521
Arabic reference: Book 16, Hadith 1478