Zechariah’s objection was that "I am an old man, and my wife is advanced in years." But as a religiously educated Jew and a priest of the temple, he knew that Abraham and Sarah, the founding patriarch and matriarch of the Jewish people, had been granted a son late in life. By asking for another sign, he demonstrated a lack of faith that God could and would provide.
Mary’s question was entirely different. It implies that she was not expecting to have marital relations with Joseph, because otherwise she would have assumed that the pregnancy would take place within her upcoming marriage, and so she needs information about how it is possible for a woman to have a baby without having had relations with a man. After Gabriel explains that the Holy Spirit would accomplish the task, she accepts without further question.