Then He said to Thomas, “Put your finger here, and look at My hands. Put your hand here and place it in My side. Do not be faithless, but believing.”28 Thomas answered Him, “My Lord and my God!”29 Jesus said to him, “Thomas, because you have seen Me, you have believed. Blessed are those who have not seen, and have yet believed.” John 20:27-29
We need to understand that Thomas was a Jew. Jews only believed in one God, YHWH the God of Abraham, Isaac & Jacob, & were very careful not to use His name in vain. By the Scriptures of the Old Testament they new about the Messiah, but didn’t have a complete understanding or revelation about Him, until Jesus came.
The prophets of the Old Testament said in referring to their coming Messiah, that He is God or Divine: