For context, I have a PhD in theoretical computer science and a master in mathematics. I've been teaching mathematics for several years ranging from high school to university.
The biggest problem for students, especially at the university level, is that they don't have the basics down. If you are not fluid in fractions and manipulating equations, you can't focus on the important part of learning induction proofs. This is just one example, but the return on investment on getting the basics down is huge.
For each new subject, you need to take the prerequisites serious. If you can't read a new definition and focus only on the new part, you should go back. The is of course very time consuming if you are missing a lot of prerequisites but if you want to get good, this is the way.
A well planned program will do this for you to some degree but the reason most people struggle is that they don't take prerequisites seriously or simple haven't learned them probably. You should be able to solve exercises in each prerequisite subject to a fairly good degree before tackling the next.
For anybody starting or doing university level mathematics I suggest your start refreshing pre-uni. Make sure you have fractions, linear and quadratic equations, exponentiation and logorithms and basic properties of functions are really down. If you have time, it can be very beneficial for pure mathematics to start out with some formal logic and natural deduction to really understand the way mathematicians reason in proofs and definitions.
Finally, ask all the stupid questions. Nobody, except yourself maybe, care if you misunderstood a basic point and got something wrong because of it. If "you just don't get" something, there is a high chance you missed something. If you don't understand the answer, same thing applies. Mathematics should be, if done properly, straight forward.