The Prophet ﷺ said, "Whoever catches one rakah of the Friday prayer or any other prayer has completed his prayer."
أخبرني موسى بن سليمان بن إسمعيل بن القاسم قال حدثنا بقية عن يونس قال حدثني الزهري
عن النبي ﷺ قال من أدرك ركعة من الجمعة أو غيرها فقد تمت صلاته
[Sahih] Reported by Ibn Majah, Establishing the Prayers and the Sunnah Concerning Them, Chapter on What Has Been Mentioned Regarding Whoever Catches [a Portion of the Prayer], hadith no. 1123, from the hadith of Baqiyyah, via this route. The hadith has many corroborating narrations in Daraqutni and elsewhere. See Tasheel al-Hajah fi Takhreej Sunan Ibn Majah, hadith no. 1121.