So i failed a class

so yeah i failed a class and i feel really bad about myself for it, and im only a freshman. i failed every midterm and i even failed the final so that pretty much killed my chances of even passing. i feel really shit about it because i done even have a major yet so it hurts me even more because i know it hurts my chances of transferring into any of the LEPs. i would really like some advice on how to change and how to improve from this because im planning on taking harder classes in the spring (calc 2 and physics 161) and i don’t wanna fall into the same place i did by failing this class

edit: what i mean by falling into the same place is that i want to find better ways to study/manage my time because after some reflecting i did today i realized that was my biggest mistake i did this semester.