What book in the Old Testament mentions the word church for the first time?

The word "church" is not mentioned in the Old Testament. The only biblical reference to the Old Testament "church" is in the New Testament book of Acts. Acts 7:37-38 "This is that Moses, who said to the children of Israel, A prophet will the Lord your God raise up to you of your brethren, like me; him will you hear. This is he, that was in the church in the wilderness with the angel who spoke to him on the mount Sina, and with our fathers: who received the living oracles to give to us:" The Bible first mentions the word "church" in the New Testament book of Matthew. Matthew 16:18 "And I say also to you, that you are Peter, and upon this rock I will build my church: and the gates of hell shall not prevail against it."

If you are looking for an Old Testament equivalent, the word congregation would be a good one. It is first mentioned in Exodus 12:3 below.

3Speak ye unto all the congregation of Israel, saying, In the tenth day of this month they shall take to them every man a lamb, according to the house of their fathers, a lamb for an house: