The Messenger of Allah ﷺ said, "If you say to your companion 'Be quiet' while the imam is delivering the sermon, you have spoken idly."
قال قرأت على عبد الرحمن: مالك وحدثنا إسحاق قال أخبرنا مالك عن أبي الزناد عن الأعرج
أن رسول الله ﷺ قال إذا قلت لصاحبك والإمام يخطب أنصت فقد لغوت
Its isnad is sahih, it appeared previously at 7672 and 10084. Imam Ahmad narrates it from Ibn Mahdi from Malik, read aloud to him, and he also narrates it from Ishaq from Malik.