They both maintained the appearance of diligent, well-mannered students in front of their professors, to the point where they received extra authority of some sort (Cozy became Twilight’s Friendship Assistant, while Tom became Head Boy). They both found a large group of devoted followers at their respective schools. They both wanted a position of power so that they could influence the students (Cozy became Headmare, while Voldemort wanted to become a DADA teacher).
The main difference is that we don’t know the backstory behind Cozy’s actions. We don’t know what happened to her parents, or what her goal after becoming Headmare would have been. Maybe she believed that mastering her own twisted version of friendship would lead her to become an alicorn, like Twilight’s studies did? We may never know for sure.
Cozy’s head came from here, by the way: >>1809596