For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
The miracles Christ performed were too obvious not to be noticed or attract questions from those who knew the beneficiaries. If a blind man received his sight or a leper is cleansed, or a mad man or demon-possessed man healed, people were bound to be curious. It would have been impossible for such beneficiaries to keep to themselves either that they were healed or how they were healed. I believe there must be a deeper reason why Christ made this demand and I think the need to focus on salvation rather than the miracle is the starting point of our understanding of the message Christ was trying to put across. Will appreciate further perspectives on this.
Here are two suggestions for you.
A. The Jews were looking for their Messiah-King to raise up an army and drive out the hated Romans. This is definitely NOT what Jesus meant when he declared "the kingdom of God is near".
Don't think the Romans weren't aware of the "messiah-king of the Jews" prophesy/legend either, and prepared to stamp it out swiftly and brutally. See Matt 2:1 &16 and Acts 5:35-37 and Mark 15:26
B. Crowds coming to Jesus and insisting "Healing first, teaching later!"
As it was, people dug holes in house roofs, lined the highway with the sick, shouted at him, tried to get close enough to touch him, and tracked his movements from place to place on foot even when he took to traveling by boat.
Jesus could have become just a walking ER if He had let them, and his true life-saving message would not have been heard, to their detriment and ours.
Jesus knew that miracles would draw the wrong attention to Himself and that Satan would use them to stir up jealousy of the religious leaders to prematurely sabotage His three-year ministry. Apart from relying on His Father for protection, Jesus did not “tempt fate” therefore He cautioned the healed to say nothing and commanded the demon-possessed who recognised Him as the Son of God to be quiet. Jesus came to die as the sacrificial lamb for our sins but He also knew the timing which He referred to as “My hour” and “My time”.
At a wedding at Cana, Jesus’ mother said to him, “They have no more wine.” Jesus replied: “Woman, why do you involve me? My hour has not yet come.” (John 2:2-4).
“Jesus did not go about in Judea because the Jewish leaders there were looking for a way to kill him.” But when the Jewish Festival of Tabernacles was near, Jesus’ brothers who did not believe in Him at the time taunted Him to go. Jesus was aware that the crowd would be on the look out for Him in the hope of more miracles so He replied: “... I am not going up to this festival, because my time has not yet FULLY come.” (John 7:1-9)
But when He took His disciples to Gethsemane to pray, they were overcome with sleep. Jesus said to them: “Are you still sleeping and resting? Look, the hour has come, and the Son of Man is delivered into the hands of sinners. Rise! Let us go! Here comes my betrayer!” (Matt 26:36-46).
Publicising the miracles of Jesus would have presented more obstacles that would have hindered the work Jesus had to accomplish before His hour had come.