There are many possibilities as why this is so, and I'll suggest a few that come to my mind, but please clarify if you do have a lead on why this is happening.
I guess one question we have to ask is if you enjoy the subject. Obviously, you don't enjoy failing, but do you actually find the content interesting and worth learning? If you don't, then that's a huge underlying problem for any subject. If you don't enjoy what you're doing, you'll naturally never succeed. If you don't enjoy the subject, and it's making you miserable, please, I wholeheartedly suggest dropping it. There's no point in suffering through anything for no reason.
Do you think you're experiencing burnout? As in, have your results started well off, but now they're veering into the less-than-desirable territory? If that is the case, just take a break. Stop studying for a while, try not to even think about the subject. Take a day or two off to recuperate. You should know that mental health is very important for functioning, what's said in your textbook isn't lying.
If you don't really understand why this is occurring to you, look at the tests you've already done and try to find a general trend in where you lose marks. Are there gaps in your tests? Are there questions you outright couldn't answer? Are your definitions wrong? If you can find a general trend in where your marks are lost, perhaps you can figure out a plan for how to rectify this in the future.
If you feel like you are falling behind in class, not keeping up with the pace of the class, etc., try to contact your teacher, find extra resources for studying, create a document or use preexisting documents as a checklist for knowledge needed in the topic. Perhaps you just need extra support in consolidating the information.