it's not impossible but if you've failed twice maths twice then it's a pretty clear indication that you're struggling in the subject. after the first fail did you identify what concepts you don't understand and work on them? you could go over a topic as explained in a textbook from the start, go over worked examples shown or examples you did in class and do lots of practice to fill in the gaps. or ask for help from your teacher, friend or tutor
if you want to improve then you will need to put in the effort, it's completely likely that you'll pass or even perform well in the next one if you've dedicated the time to learn and practice the things you've been struggling with
everyone has that one or two weak subjects so you're not alone but yeah it's gonna take some remediation on your part