Throughout the Book of Ezekiel, God says that various people shall know that God is the LORD. Usually, the context is God's wrath. In Ezekiel, the ones who will know God's identity include the people of Judah and other nations, such as Moab, Edom, Philistia, Tyre, and Egypt.
I can understand how Judah would recognize that God is the LORD, especially after her calamity. After all, Judah had a tradition of Yahwism. Once Judah fell and asked how she got into her mess, one possible answer would be that she displeased her national god. Her answer would be based on elements of her own national tradition, which was her filter for interpreting events.
But why would the other nations know that God is the LORD after their calamities? If Babylon invaded them, wouldn't they have their own way of interpreting the events? They may say that Babylon was stronger, or that the Babylonian god was too powerful, or that they displeased their own national deities. Why should they conclude that they fell through offending the LORD, the god of another nation that fell? Why did Ezekiel believe that the nations would interpret history as he did?
One reason may be that the other nations had a history with Israel's God. Throughout the Bible, nations such as Egypt, Moab, and Philistia experience God's power. They see God's supremacy as they suffer or lose battles at the hands of the Israelite deity. And they were Israel's neighbors, so Israel's relationship with the LORD did not exist in a vacuum. Consequently, when these nations fell, one explanation that may have entered their minds was that they had offended the God of Israel. And they could point out examples in which that was the case. The Ammonites, the Edomites, the Moabites, and the people of Tyre actually rejoiced at the destruction of Jerusalem and the LORD's temple, and they tried to take advantage of the situation. That made God angry. At their own destruction, the nations may have thought, "I think we're being punished for hurting Israel. You've heard the stories about their powerful God. Well, I guess those stories are true. Scratch that! I KNOW that they are."
Another possible reason is that Ezekiel expected the people of other nations to hear God's message. Ezekiel 26 is actually directed to Tyre. I doubt that Ezekiel actually went there, but could he have sent a representative? Jeremiah had his representative, Baruch. Plus, some prophets, such as Jonah, went to foreign countries. When the Gentiles heard the prophetic message in the name of the LORD and experienced its fulfillment, they would hopefully conclude that the God behind the message was the true God.
Or maybe Ezekiel thought that the nations would hear God's message after their destruction. Babylon may have taken Israel into exile with other nations, meaning that Jewish exiles could have interacted with exiles from other countries. In Ezekiel 12:15-16, God says that he will scatter the Israelites among the nations. According to the passage, the result will be that Israel will testify to them about her punishment at the hand of the LORD. Afterwards, they (presumably the nations) will know that God is the LORD. In exile, the Jews may have said to the exiles of other countries, "We were destroyed for offending the LORD, and so were you." Why would the nations believe them? I don't know. Maybe they would be more inclined to believe the Jews after Israel's national restoration. Or perhaps God would confirm in their hearts the truth of the Jews' message.
One last possibility: the nations would know that God is the LORD in the afterlife. Ezekiel 26:20 says that God will send Tyre to the pit, to the people of long ago. Isaiah 14:9-11 has similar imagery, as former mighty men taunt fallen Babylon in Sheol. In the afterlife, maybe people knew the truth about the true God's identity and other matters. Or at least Ezekiel may have thought that to be the case.
Any other possibilities that come to your mind?