Literacy happened in Egypt, more than a millennium after writing was born.
The first formal alphabet emerged around 2000 BC. C. to represent the language of the Semitic workers in Egypt, and it was conceived from the alphabetic principles contained in the Egyptian hieroglyphs. Most of the world's current alphabets either descend directly from this root, for example Greek and Latin alphabets, or were inspired by its design.
There were different alphabets, Greeks, Romans, peninsular and Greeks
As soon as literacy emerged, it was considered to be a means of communication or codes by which it sought to transmit something.
Some considered it an ordered system of graphic signs that was used in the writing of some languages and that was based on the more or less approximate correspondence between these signs and the phonemes they represented.