The earliest method that God used to convey messages to humanity was through direct oral communication, such as audible voices, or dreams, or angels. It was not until the time of Moses that Scripture records the first divine instruction regarding these experiences, which was to write in a “book” what God had spoken.
What is the first mention of writing in the Bible? Read Exodus 17:14.