Matthew is the first gospel written about 80 ish years after Jesus died... so the word of mouth is what carried on the stories of Jesus. In addition, the Old Testament is Jewish, so that existed before Jesus did.
But please, I beg of you to think wider than the creation of the bible as what is deemed as “ Christian knowledge”.
These stories of Jesus and what he taught were monumental:the gospels of mark, Matthew, Luke and John where written years after Jesus died. He was infamous as a rabbi that went against the practices of his Jewish faith. He flipped tables in synagogues, helped on sabbath day, talked of forgiveness when living in a time where you were killed for even committing adultery. He also treated women as his equals such as Mary Magdalene. Christianity began as a divided branch of Judaism and if it weren’t for St Paul’s letters, there probably wouldn’t be a book. But once more, these stories are passed on. From word of mouth. There’s no strong evidence that they are real.