This is a question raised by people who deny the deity of Christ. They say, “If Jesus was God, then why not just say it?” But this objection has a couple of problems.
It misses how His hearers would have understood that claim
If Jesus said, “I am God”, He would have been completely misunderstood. His hearers would have thought that He was saying that God was actually a man – the divine nature was a human nature. They would have taken Him to be saying that God is not the transcendent being whose throne is in heaven, who fills the universe, but rather He is like the pagan deities who have human-like limitations. This, then, would have prevented any Jew from giving Him a hearing.
So, the biblical truth of the Trinity would have been missed by Jesus simply saying, “I am God”, and the biblical truth of the incarnation would likewise have been misunderstood by such a statement. The reality of the Trinity and the incarnation can’t be communicated accurately or adequately in a soundbite.
It misses how His hearers did understand the claims He made
The Lord Jesus said and did things that left people in no doubt that He was claiming deity, and yet not claiming to be the Father. He said and did things that only God could say and do, and yet He spoke about Himself as a real man and the Father (and the Holy Spirit) as a distinct person. This resulted in Christians examining the Old Testament Scriptures and seeing that God is revealed there in a way that demands the doctrine of the Trinity (e.g. Genesis 1:26-27), and the Messiah is presented there in a way that demands the doctrine of the incarnation (e.g. Isaiah 9:6).
The Jewish leaders recognised Jesus claimed to be God – that’s why they condemned Him to death. It’s not blasphemy to claim to be the Messiah. It’s not even blasphemy to claim to be a pre-existent person. But it would be blasphemy for a creature to claim to have the nature, name and prerogatives of the God of Israel, and that’s what Jesus claimed.
Not only did the Jewish leaders recognise Jesus claimed to be God, but His Jewish followers saw it too. The last people who would have believed that a man was God were the first people who did. Jesus’ disciples were God-fearing Jews, and yet they identified Jesus as God (e.g. John 1:1), Yahweh (e.g. 1 Peter 2:3 with Psalm 34:8), the Author of life (Acts 3:15) and the Lord of glory (e.g. James. 2:1). There’s no way they could have believed such a thing unless He claimed it, and rose from the dead in vindication of those claims.
Jesus knew what He was doing when He revealed the truth of His identity. It led to Thomas calling Him, “My Lord and my God” (John 20:28), and anyone looking at the evidence honestly will be led to the same conclusion and the same confession.