The Messenger of Allah ﷺ said, "When you come to the prayer, do not come rushing. Come walking with calmness and dignity. Whatever you catch, pray it, and whatever you miss, make it up."
أخبرنا عبد الله بن محمد بن عبد الرحمن الزهري قال حدثنا سفيان حدثنا الزهري عن سعيد
قال رسول الله ﷺ إذا أتيتم الصلاة فلا تأتوها وأنتم تسعون وأتوها تمشون وعليكم السكينة فما أدركتم فصلوا وما فاتكم فاقضوا
Muslim narrated it in the Book of Mosques, Chapter on the desirability of coming to prayer with dignity and tranquility, etc., Hadith 602, from the hadith of Sufyan bin Uyayna, with the same wording. It is also found in Kubra, Hadith 934.