Hadeeth of Anas Bin Maalik, `Abdullaah Bin `Amr, and `Abdullaah Ibn Al-`Abbaas, in As-Saheehah, number, 2026, [which states],“Write knowledge in books.” Abdullaah Ibn `Amr said, “I used to write down everything I would hear from the Messenger of Allaah, ﷺ and would want to memorize it, so Quraish forbade me [from do so], and said, ‘You write everything and the Messenger of Allaah, ﷺ, is a human being, he speaks [sometimes] with anger, and [sometimes] with delight! So I held out from writing and informed the Messenger of Allaah, ﷺ; he made a signal with his finger to his mouth and said, ‘Write, for by whom my soul is in his hand, nothing comes out of it (meaning his mouth) except truth.’” Collected by Abu Dawood, Ad-Daarimee, Al-Haakim, and Ahmad, and is in As-Saheehah, number, and 1532.
So Hadeeth (sunnah) were preserved in written form by those companions who could write!!!
So do not be misguided by those who say hadith was not written down during the revelation period?!..,