Socrates said no such thing, no writing of Socrates has survived. He was just a character is Plato's book, Phaedrus.
Please do find the original paragraphs before accusing Socrates of this. https://standardebooks.org/ebooks/plato/dialogues/benjamin-j...
Of course, you can read and interpret that same book a thousand different ways, like he was talking about knowledge not being the same as writing things down, or whatever you want. But we don't even pretend to read the things we talk about. We just repeat nice narratives we have supposedly read somewhere else, digested by someone else, somehow.