Jesus said to them, “Truly, truly, I say to you, before Abraham was, I am.” (John 8:58).
Here in John 8:58, and in many other places, Jesus made it clear that he was the God of the Old Testament. This means that all the words of the Bible are his words. Don’t be misled by the Bibles which highlight in red the words from Jesus’ earthly ministry. Those red letter words are no more and no less the words of Jesus than the rest of the Bible. Remember that “all Scripture is breathed out by God” (2 Timothy 3:16), not just the ones in red.