I feel like this will probably get closed for being off-topic, but on the other hand I feel my three (admittedly long and somewhat ranting) big pieces of advice could help out someone, somewhere, down the road.
Practice, practice, practice!
I feel like I often see people bemoan the inclusion of many "this proof is left to the reader" exercises, or many exercises in general, in textbooks. These are included for a good reason - they're meant to be done and utilized whenever you can. You won't be able to truly learn mathematics by just reading the text or listening to lectures and thinking "oh, I'll remember that," or "oh, I understand that deeply."
It might get you by in lower-level stuff, but it won't for very complicated, nuanced, higher-level stuff. These exercises can help you see the nuances and intricacies of what you're learning; why one method or idea fails where another succeeds; the merits of one train of thought, as opposed to another. A well-designed text uses exercises to deepen your understanding, as opposed to merely strengthening your muscle memory so you can solve the billionth quadratic equation you've found.
Sadly I feel that is lost on younger people since a lot of what their texts use for exercises seem to be "solve these and those equations using X method," or stuff of the sort - unless you get a wonderful teacher anyhow. Still, these are valuable in their own way since they at least let you practice until you get the methodology down pat. I feel in part that's why a lot of people see math as boring as well - that primary school usually teaches it as things to be memorized and spat out mechanically when needed - but this broaches on a different topic altogether...
In summary:
- Do exercises the textbook poses to you. If you're stuck, that's fine, just try to complete them, or at least understand the solution. MSE is in fact more than willing to help you in these respects!
- At almost no level of mathematics is there really an exception to this rule, except maybe the very computational math (e.g. solve this equation, find this derivative, multiply these matrices) that textbooks can cram dozens of exercises on. Those, you should do until you feel very comfortable with the computations. And if you still aren't by the end? Oftentimes such exercises lend themselves to letting you know how to make your own, so practice that way!
Check your work!
It's a small thing, but the benefits are great insofar as grades and such go. Especially after the previous, it's best to go over your work and ensure it's valid - you might get too much of a hang of things, and make a slip up without knowing it. (I imagine everyone here has accidentally had an error in the sign of some number or variable at least once.) Depending on the context any number of means of checking your work exist:
- Substitute in your solution. This works for problems that amount to "solve this equation," e.g. roots of polynomials, differential equations. If $a$ is a root of some function $f$, you need to be sure $f(a) = 0$. This is especially useful when your method introduces extraneous solutions.
- Ensure your solution makes sense. How it "makes sense" depends on the problem. For example, if you find the indefinite integral of a function, you'd best be sure differentiating gets you that function again! If you're finding the determinant of a matrix which has one row visibly a scalar multiple of another, then you'd better hope the result you derived was $0$! If you're finding a probability, you should be sure that it is between $0$ and $1$ inclusive, and not some massive number. And so on and so forth.
- Re-derive the work, from scratch. Sometimes doing it a second time will result in a different answer, even if the process is (you think) exactly the same. Figure out where the difference arises. This is particularly useful for homework, in the event you can do the problem, then look back at it a few hours or days later, and rework it, to let the original workings leave your mind.
- Find the solution an alternative way. Oftentimes there is more than one way to approach a math problem, depending on your level of sophistication. For example, a math YouTuber named Dr. Peyam made a series of twelve videos on different methods to find the value of $\int_{-\infty}^\infty e^{-x^2}dx$, and there are hundreds of proofs to the Pythagorean theorem (here's 122 of them). I personally also find it slightly amusing when I see this convoluted problem in class, yet know a much simpler way to solve it using some external knowledge - of course it would defeat the purpose of the class if I submitted that answer for a test or something, but, hey, it lets me know my answer is right! If you can validate your answer by solving it in some other way than your original method, that makes the validity of your result that much stronger if you were unsure. (Finding an old result in a new way can even lead to new insights into mathematics itself...)
- Question every step in your derivation. Failing any of the above being a possible method, the best you can do is review your work in granular detail. Justify each and every step, leaving no potential ambiguities or arbitrary decisions left unturned. This becomes easier once you're more used to writing proofs and such, where there an expectation that you explain your workings and motivations somewhat, and thus have to explain these steps (the non-obvious ones in particular) to your reader. Find any potential logical flaw in your work, and scrutinize it. Sadly, what ultimately consists of something worth scrutiny is something you'll have to develop with practice, so refer to my first section.
Never, ever be afraid to ask questions.
There are no "stupid" questions in mathematics (except perhaps the typical "is this going to be on the test?", and I guess anything not really related a lecture when one is going on). No lecturer and no textbook are perfect; there are nuances they might overlook, or interesting branches of thought they might brush over for some reason or another. If you're just confused, ask anyways, here, in class, wherever -- if you're confused, you're probably not the only one. There's probably some shy kid somewhere with the exact same question. (I think the syllabi at my university even explicitly have been saying this now, probably for this very reason, calling it a community service.)
Obtaining clarification when you're confused is a good thing.
Curiosity is a good thing.
Don't lose sight of either of those.
(This doesn't mean each question will have a satisfying answer and some might ultimately require you to do research on your own, or talk to your lecturer after class hours, depending on their willingness. This moreso goes for the curiosity bit than the clarification bit - sometimes the right question opens a whole can of worms that can't be covered easily without conflicting with the curriculum, sadly.)