Uthman bin Affan reported,

I heard the Messenger of Allah ﷺ say, "Whoever performs ablution for prayer and does so thoroughly, then walks to the prescribed prayer and prays it with the people, or with the congregation, or in the mosque, Allah will forgive him his sins."

Azami 2362

Sahih

عن عثمان بن عفان قال

سمعت رسول الله ﷺ يقول: من توضأ للصلاة فأسبغ الوضوء، ثم مشى إلى الصلاة المكتوبة، فصلاها مع الناس، أو مع الجماعة، أو في المسجد غفر الله له ذنوبه.

الأعظمي 2362صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Congregational prayer
Section
Establishing the congregational prayer twice in mosques
Numbering
Jami al-Kamil 2362 (2nd edition)
Azami 2362