Sahih Muslim 1307
Sahih Muslim · Book 15: The Book of Pilgrimage · It is permissible to offer the sacrifice before stoning the Jamrah, or to shave before offering the sacrifice or stoning the Jamrah, or to perform Tawaf before any of them
Ibn Abbas (Allah be pleased with them) reported that it was said to Allah's Apostle (ﷺ) about sacrificing of animals, shaving of one's head, throwing of pebbles, and (the order of) precedence and succession, and he said:
حَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ ، حَدَّثَنَا بَهْزٌ ، حَدَّثَنَا وُهَيْبٌ ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ طَاوُسٍ ، عَنْ أَبِيهِ ، عَنِ ابْنِ عَبَّاسٍ ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قِيلَ لَهُ فِي الذَّبْحِ وَالْحَلْقِ وَالرَّمْىِ وَالتَّقْدِيمِ وَالتَّأْخِيرِ فَقَالَ " لاَ حَرَجَ " .
There is no harm in it.