Bara bin Azib reported,

I heard the Prophet ﷺ delivering a sermon in which he said, "The first thing we will do on this day of ours is to pray, then return and offer our sacrifice. Whoever does this has followed our sunnah, and whoever slaughters before the prayer is simply offering meat to his family, with no connection to the rite of sacrifice."Abu Burda said, "Messenger of Allah, I slaughtered before the prayer, and I have a young goat that is better than a mature one."He replied, "Sacrifice it in place of the other, but it will not suffice for anyone after you."

Bukhari 5560

Sahih

حدثنا حجاج بن المنهال حدثنا شعبة قال أخبرني زبيد قال سمعت الشعبي

عن البراء رضي الله عنه قال

سمعت النبي ﷺ يخطب فقال إن أول ما نبدأ به من يومنا هذا أن نصلي ثم نرجع فننحر فمن فعل هذا فقد أصاب سنتنا ومن نحر فإنما هو لحم يقدمه لأهله ليس من النسك في شيء فقال أبو بردة يا رسول الله ذبحت قبل أن أصلي وعندي جذعة خير من مسنة فقال اجعلها مكانها ولن تجزي أو توفي عن أحد بعدك

البخاري 5560صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Sacrificial animals
Chapter
Slaughtering after the prayer
Numbering
Darussalam 5560
Bukhari 5560