The Messenger of Allah ﷺ said, "Whoever catches one rakah of the prayer has caught the prayer."
حدثنا أبو بكر بن أبي شيبة وهشام بن عمار قالا حدثنا سفيان بن عيينة عن الزهري عن أبي سلمة
قال رسول الله ﷺ من أدرك من الصلاة ركعة فقد أدرك
Bukhari narrated it in "Times of Prayer," chapter on one who catches a rakat of the prayer, and Muslim in "Mosques," chapter on one who catches a rakat of the prayer has caught that prayer, 607, from the hadith of Zuhri, through him.