The Messenger of Allah ﷺ said, "Whoever seeks to be heard, Allah will expose him, and whoever shows off, Allah will expose his pretense."
قال رسول الله ﷺ: من يسمع يسمع الله به، ومن يرائي يرائي الله به.
No references are available.
Bukhari related it in the Chapter on Softening of Hearts (6499), and Muslim in the Chapter on Asceticism (2987), both of them through various routes from Sufyan, from Salama bin Kuhayl, who said, "I heard Jundab," and he related it.