In the Harry Potter book series, Severus Snape becomes headmaster of Hogwarts after Dumbledore’s death.
Snape takes the position during Harry Potter and the Deathly Hallows, after Albus Dumbledore dies at the Astronomy Tower. His appointment occurs while the Ministry of Magic is controlled by Voldemort’s regime, and Hogwarts is placed under authoritarian leadership.
Although Snape appears to serve Voldemort, the later revelation of his long-term loyalty to Dumbledore changes the meaning of many earlier events. His headmastership remains morally complicated: he enforces the new regime’s policies while secretly working against Voldemort’s ultimate plans.
Snape is not the permanent headmaster of Hogwarts. After Voldemort’s defeat, Minerva McGonagall leads the school, and later accounts identify her as headmistress. This distinction explains why McGonagall is a plausible but incorrect answer to the question about the period immediately following Dumbledore’s death.