Sahih Muslim 5121
The Book of Sacrifices
وَحَدَّثَنِي حَجَّاجُ بْنُ الشَّاعِرِ، حَدَّثَنِي يَحْيَى بْنُ كَثِيرٍ الْعَنْبَرِيُّ أَبُو غَسَّانَ، حَدَّثَنَا شُعْبَةُ، عَنْ مَالِكِ بْنِ أَنَسٍ، عَنْ عُمَرَ بْنِ مُسْلِمٍ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، عَنْ أُمِّ سَلَمَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " إِذَا رَأَيْتُمْ هِلاَلَ ذِي الْحِجَّةِ وَأَرَادَ أَحَدُكُمْ أَنْ يُضَحِّيَ فَلْيُمْسِكْ عَنْ شَعْرِهِ وَأَظْفَارِهِ " .
Umm Salama reported (these words) directly from Allah's Messenger (ﷺ):If anyone has in his possession a sacrificial animal to offer as a sacrifice (on 'Id al-Adha), he should not get his hair cut and nails trimmed after he has entered the first days of Dhu'l Hijja
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.