The Prophet ﷺ said, "The first thing that we should do on this day of ours is to pray and then return to slaughter the sacrifice. So anyone who does so, he acted according to our Sunna (tradition), and whoever slaughtered the sacrifice before the prayer, it was just meat which he presented to his family and would not be considered as Nusuk." A person from the Ansar named Abu Burda bin Niyyar said, "O Messenger of Allah ﷺ! I slaughtered the Nusuk (before the prayer) but I have a young shegoat which is better than an older sheep." The Prophet ﷺ I said, "Sacrifice it in lieu of the first, but it will be not sufficient (as a sacrifice) for anybody else after you." (Using translation from Bukhārī 965)
قَالَ رَسُولُ اللهِ ﷺ إِنَّ أَوَّلَ مَا نَبْدَأُ بِهِ فِي يَوْمِنَا هَذَا أَنْ نُصَلِّيَ ثُمَّ نَرْجِعَ فَنَنْحَرَ فَمَنْ فَعَلَ ذَلِكَ فَقَدْ أَصَابَ السُّنَّةَ وَمَنْ نَحَرَ قَبْلَ الصَّلَاةِ فَإِنَّمَا هُوَ لَحْمٌ قَدَّمَهُ لِأَهْلِهِ لَيْسَ مِنَ النُّسُكِ فِي شَيْءٍ فَقَالَ رَجُلٌ مِنَ الْأَنْصَارِ يُقَالُ لَهُ أَبُو بُرْدَةَ بْنُ نِيَارٍ يَا رَسُولَ اللهِ إِنِّي قَدْ ذَبَحْتُ وَعِنْدِي جَذَعَةٌ خَيْرٌ مِنْ مُسِنَّةٍ فَقَالَ لَهُ اجْعَلْهَا مَكَانَهَا وَلَنْ تُوَفِّيَ أَوْ لَنْ تُجْزِيَ عَنْ أَحَدٍ بَعْدَكَ