I work as a high school teacher for a religious school (501c3). I made over $40,000, but they did not withhold federal taxes. Is this a payroll error or am I exempt?

I made over $40,000 (box 1 on w-2), but box 2 is blank. I confirmed on my paystubs that they did NOT withhold any federal tax. However, now I owe $5,000 in federal taxes. Is this a payroll error I need to have fixed for future years? Or am I exempt and entering something in incorrectly when filing so it is not calculating my tax obligation correctly.