Thus shall Ezekiel be to you a sign; according to all that he has done you shall do. When this comes, then you will know that I am the Lord GOD.
One of the unique features of the prophecy of Ezekiel was the use of circumstances and actions to convey God's message. This non-verbal communication was meant to get the attention of a rebellious people who were headed into painful consequences for their sin. It was a means toward clarity.
In the circumstances of Ezekiel 24, God warned the prophet that his wife was soon to die. Upon her death Ezekiel was forbidden to speak and forbidden to show any outward sign of mourning. God had a message in those actions. He was warning the people of Jerusalem that they too would experience death and a numbing loss so powerful that they would not be able to mourn it. They were warned by Ezekiel's actions. The crisis trauma would leave them so devastated by its swiftness that they would not be able to mourn.
That may seem to be a cruel message from God, but as I think about it, I see it as a gracious warning. Ultimately the Jews did not heed Ezekiel's warnings in any substantive way. His actions went unheeded. God knew this but still let them know what was coming. They would at least be aware that none of their trauma was taking God by surprise. He mercifully prepared them for it and let them know His sovereign hand was in it. They may have cringed at God's stern justice but it was only because they refused to repent, following God and experiencing His lovingkindness. The Babylonian captivity would purge Israel and eventually restore the covenant commitments of God's people. And that is the end to which these pain-filled warnings clearly point.