Before looking at them, we should ask "why Matthew"? In other words, why didn't Mark, Luke or John use the word in their accounts of the Lord's life? To answer that, we need to understand that each Gospel-writer was writing to a different audience, and their language and choice of sayings, stories and incidents in the Lord's life reflect the language, backgrounds and interests of their particular audience as well as telling us something about the writer himself.
Matthew wrote for an audience of Jewish Christians. He quotes frequently from the Jewish Bible - the Law and the Prophets - in a way which indicates that his audience was familiar with it. He starts his account of the life of Jesus by establishing Jesus' pedigree, and His claim to the Kingship of Israel. Matthew writes to people who are familiar with offering sacrifices in the Jerusalem Temple (Matt 5:23-24), and possibly still did at the time of writing. Of the four Gospel writers it is only Matthew who records these words of Jesus: "Do not think that I have come to abolish the Law or the Prophets; I have not come to abolish them but to fulfill them" (Matt 5:17). His audience had been raised on the Law and were very sensitive to any suggestion that it was no longer relevant. In fact, it's almost certain that Matthew's audience was Jewish Christianity, as distinct from Gentile Christians. They identified more closely with Peter and James than with Paul. They believed in Jesus as the Messiah of Israel while still maintaining their Jewish customs and culture. Jewish Christianity was quite distinct from Greek, Roman or African Christianity and its likely that each had their own customs, traditions and practices.
So when we read the word "church/ekklesia" in Matthew, we should realise that Matthew is using this word in the way the Jewish Christians would have understood it. The word ekklesia literally means an assembly, and Stephen used this word in Acts 7:38 when referring to the assembly of Israel in the wilderness. So when Jesus was talking about winning back "a brother who has sinned against you" He says to first speak with him one-on-one, and if that fails to then take one or two others, and if that fails then "take it to the assembly" (Matt 18:15-17). He is saying that in order to bring about a reconciliation we should involve the whole community if necessary. Now to Matthew's audience that "assembly" may well have been the local synagogue, the gathering-point for much of the life of the community. At the time the words were spoken there was no "church" in the sense of a Christian meeting, and the word would have been an anachronism in this sense. Matthew's "church" was the local community, probably assembled in a synagogue.
Stephen's use of the word ekklesia to describe Israel (Acts 7:38) makes use of the Greek word used in the Septuagint (the Greek translation of the Old Testament) to translate the Hebrew word for the assembly of Israel. Ekklesia was understood in its Jewish sense, not a Greek one.
To Stephen, and Matthew, the church/ekklesia was Israel.
When Jesus said to Peter "on this rock I will build my church/ekklesia/assembly" (Matt 16:18) He was referring to the Kingdom of God about which He was preaching. He was using Old Testament language to refer to the assembly of God's people and was drawing on Prophetic language which described Israel as a tent or building which had collapsed and which would be restored by the Messiah. James used the same Prophetic language at the Jerusalem Council:
"Brothers, listen to me. Simon has described to us how God at first showed his concern by taking from the Gentiles a people for himself. The words of the prophets are in agreement with this, as it is written:
" 'After this I will return
and rebuild David's fallen tent.
Its ruins I will rebuild,
and I will restore it,
that the remnant of men may seek the Lord,
and all the Gentiles who bear my name,
says the Lord, who does these things'
that have been known for ages.
"It is my judgment, therefore, that we should not make it difficult for the Gentiles who are turning to God."
The "assembly" which Jesus said He would build was to be the restored ruins of David's fallen kingdom. It was to be a new Israel, made up of both Jews and Gentiles.
Jesus use of the word ekklesia in Matthew's Gospel refers in one instance to the local contemporary community assembly in Israel, and in the other to the new assembly of God's people which He would establish. It's prophetic language - Kingdom language. There is no hint in either place that Jesus has in mind an institutionalised organisation which would become known as "the church".