This question already has an answer here:

Throughout the entire series, it was rumored that there is a jinx on the post of "Defence Against the Dark Arts" teacher, which leads to the fact that, no wizard can hold that post for more than 1 year. This curse was cast by Lord Voldemort. If Dumbledore knew the existence of this curse, why didn't he do anything to lift the curse?

marked as duplicate by Mithrandir, Valorum harry-potter Sep 2 '18 at 9:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.