[Machine] The Prophet ﷺ used to let his hair grow, but when it became too long, he would have it shaved. Muslim al-Mula'i, who is weak in hadith, narrated this. However, if it is confirmed that Qatadah also narrated it from Anas, then it is possible that he took it from him. Allah knows best. It has also been narrated from Ibn Umar regarding this matter.
كَانَ النَّبِيُّ ﷺ لَا يَتَنَوَّرُ فَإِذَا كَثُرَ شَعْرُهُ حَلَقَهُ مُسْلِمٌ الْمُلَائِيُّ ضَعِيفٌ فِي الْحَدِيثِ فَإِنْ كَانَ حَفِظَهُ فَيُحْتَمَلُ أَنْ يَكُونَ قَتَادَةُ أَخَذَهُ أَيْضًا عَنْ أَنَسٍ وَاللهُ أَعْلَمُ وَقَدْ رُوِيَ فِي ذَلِكَ عَنِ ابْنِ عُمَرَ