When you say “changing my course”, I am assuming you mean changer your major.
If this is the case, then Absolutely ! ! ! Hopefully you are taking mostly courses that apply to all college degrees (which can vary from school to school).. Changing major is always better sooner than later. The more semesters you wait to change your major, the longer it will take to get your Bachelor’s degree.
Good luck….esp in math. Most college students struggle with math these days. Well, at least in the U.S.