I heard the Messenger of Allah ﷺ say, "When the prayer has begun, do not come to it running. Come to it walking, with calmness upon you. Whatever you catch, pray, and whatever you miss, complete it."
حدثنا أحمد بن صالح حدثنا عنبسة أخبرني يونس عن ابن شهاب أخبرني سعيد بن المسيب وأبو سلمة بن عبد الرحمن أن
سمعت رسول الله ﷺ يقول إذا أقيمت الصلاة فلا تأتوها تسعون وأتوها تمشون وعليكم السكينة فما أدركتم فصلوا وما فاتكم فأتموا
Bukhari narrated it in the chapter on adhan, in the section titled "One should not rush to prayer but should approach it with calmness and dignity," hadith 636, and Muslim narrated it in the chapter on mosques, in the section titled "The recommendation of coming to prayer with dignity and calmness, and the prohibition of rushing to it," hadith 602, from the hadith of Ibn Shihab Zuhri, with slight variation.