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. (Using translation from Abū Dāʾūd 564)
قَالَ رَسُولُ اللهِ ﷺ مَنْ تَوَضَّأَ فَأَحْسَنَ وُضُوءَهُ ثُمَّ رَاحَ فَوَجَدَ النَّاسَ قَدْ صَلَّوْا أَعْطَاهُ اللهُ مِثْلَ أَجْرِ مَنْ صَلَّاهَا أَوْ حَضَرَهَا لَا يَنْقُصُ ذَلِكَ مِنْ أُجُورِهِمْ شَيْئًا