The Messenger of Allah ﷺ said, "The people who receive the greatest reward for prayer are those who walk the farthest to reach it, then those next farthest. And the one who waits to pray until he prays it with the imam has a greater reward than the one who prays it and then goes to sleep."In the narration of Abu Kurayb, the wording is, "until he prays it with the imam in congregation."
حدثنا عبد الله بن براد الأشعري وأبو كريب قالا حدثنا أبو أسامة عن بريد عن أبي بردة
قال رسول الله ﷺ إن أعظم الناس أجرا في الصلاة أبعدهم إليها ممشى فأبعدهم والذي ينتظر الصلاة حتى يصليها مع الإمام أعظم أجرا من الذي يصليها ثم ينام وفي رواية أبي كريب حتى يصليها مع الإمام في جماعة