The Prophet ﷺ used to teach us not to race ahead of the imam in bowing or prostrating. When he says the takbir, say the takbir, and when he prostrates, prostrate.
حدثنا أبو بكر بن أبي شيبة حدثنا محمد بن عبيد عن الأعمش عن أبي صالح
كان النبي ﷺ يعلمنا أن لا نبادر الإمام بالركوع والسجود وإذا كبر فكبروا وإذا سجد فاسجدوا
[Sahih]. Ahmad narrated it, 2/440, from Muhammad bin Ubayd, through this route. Muslim also narrated it, in the Book of Prayer, Chapter on the Prohibition of Anticipating the Imam in the Takbir and Other Actions, hadith 415, from the report of Isa bin Yunus, from Amash, through this route.