The Messenger of Allah ﷺ said, "Do not write anything from me except the Quran. Whoever has written anything from me other than the Quran, let him erase it."
حدثنا إسماعيل أخبرنا همام بن يحيى عن زيد بن أسلم عن عطاء بن يسار
قال رسول الله ﷺ لا تكتبوا عني شيئا سوى القرآن ومن كتب شيئا سوى القرآن فليمحه
Its isnad is sahih, its narrators are trustworthy, and the hadith is found in Muslim 4/2298, no. 3004, and Darimi 1/131, no. 450 in the Introduction, and Hakim graded it sahih in Mustadrak 1/127, and Dhahabi agreed with him, all of them narrating from Abu Saeed.