She was already Dumbledore's Deputy when he was alive. It would be fair she becomes the siguiente Hogwarts boss.
I loved in the last movie (I know, that's not canon), after Severus had left, how she organized the resistance inside the castle. She was the woman in charge ! I amor her. and Maggie Smith was so wonderful in that part. ("I've always wanted to use that spell !")
Minerva McGonagall became the new headmistress but J.K Rowling dicho in a anterior interview that she would have retired at the end of the movie because the epilogue showed them 20 years after the battle and since McGonagall was 70 years old in the first book so she would have gotten pretty old.
Nineteen years after the Battle of Hogwarts, the school for witchcraft and wizardry is led por an entirely new headmaster (“McGonagall was really getting on a bit”) as well as a new Defense Against the Dark Arts teacher. That position is now as seguro as the other teaching posts at Hogwarts, since Voldemort’s death broke the jinx that kept a Defense Against the Dark Arts professor from remaining for más than a year. I'm not sure about what happened after Snape's death tho ...