This question already has an answer here:
After Jesus cast out demons from possessed people, he made sure that these demons didn't reveal his true identity. Why?
Example from Mar 1:24-25,34 (NIV):
24“What do you want with us, Jesus of Nazareth? Have you come to destroy us? I know who you are—the Holy One of God!”
25“Be quiet!” said Jesus sternly. “Come out of him!”
34and Jesus healed many who had various diseases. He also drove out many demons, but he would not let the demons speak because they knew who he was.