The Prophet ﷺ said: whoever performs ablution, and performs his ablution perfectly, and then goes to the mosque and finds that the people had finished the prayer (in congregation), Allah will give him a reward like one who prayed in congregation and attended it; The reward of those who prayed in congregation will not be curtailed.
قَالَ رَسُولُ اللَّهِ ﷺ مَنْ تَوَضَّأَ فَأَحْسَنَ وُضُوءَهُ ثُمَّ رَاحَ فَوَجَدَ النَّاسَ قَدْ صَلَّوْا أَعْطَاهُ اللَّهُ جَلَّ وَعَزَّ مِثْلَ أَجْرِ مَنْ صَلاَّهَا وَحَضَرَهَا لاَ يَنْقُصُ ذَلِكَ مِنْ أَجْرِهِمْ شَيْئًا