When they ran out of wine, the mother of Jesus said to him, They have no wine. Jesus said to her, Woman, what does your concern have to do with me? My hour has not yet come. His mother said to the servants, Whatever he says to you, do it.

John 2:3-5.
John the Baptist had seen how the Holy Spirit had descended on Jesus and then “testified that this is the Son of God” (ch.1:v.34). This marked the beginning of the public ministry of the Son of God. As such He proclaimed, “I have come down from heaven, not to do my own will, but the will of him who sent me” (John 6:38).
That Jesus was conscious of His mission to fulfil God’s will was shown at the marriage of Cana, to which He Himself, His mother and His disciples had all been invited. Here occurred the embarrassing situation that in the course of the feast the wine ran out. Mary knew that only one Person could help and turned to Jesus. It may well seem incomprehensible that He dismissed her so abruptly. However, our verse tells us that He had not come to carry out His own will, but to follow His Father’s directions and wait for His signal. Only then could He act and do that first sign that revealed His glory, a reflection of the Father’s glory.
Mary was now beginning to grasp Jesus’ submission to His Father’s will and no longer to hers. What she said to the servants shows something of her increasing understanding: “Whatever he says to you, do it.” This is something we can learn from her.