Understand that the lecture material is not maximal for examinable material, and you will usually need to self study a lot of the material to do well on the exam. This is not a failing of the lecturer, but the nature of university study. Lectures will very often just be an introduction or brief outline of a topic, and you will need to delve deeper yourself into it to flesh out the details or extend what has been started. For STEM courses lectures can either be used mainly to just run through worked examples/proofs, leaving you to learn the "theory" largely independently, or be used to introduce the theory or derive equations, leaving you to practice through example questions outside of lectures. Essentially, you should expect to be doing most of the work yourself. The contact hours are more about checking you're on the right track with your independent studies, clearing up any misconceptions, and getting an idea of where things are going next.
If you have tutorials/supervisions/seminars/discussion groups/etc, you should prepare for these in advance; don't just show up with a pen and paper and empty head ready to be filled! The point of them is for you to explore what you already know in discussion with others - the learning should take place before the tutorial/whatever, the tutorial is where you talk through issues you encountered while doing the learning and/or assigned work. For lab work, make sure you have reviewed the "theory" behind whatever lab/practical you will be doing beforehand, and read through the experimental methodology/procedure(s) you will be using in the lab. For both labs and tutorials/etc, write down any questions you come up with while doing this preparation - then ask them!
The same principle of preparing beforehand also applies to lectures, albeit not to the same extent as for tutorials etc. At the very least, try and print out the lecture notes for the lecture before going to it and take them with you. This way you can focus on writing in comments from what they are saying instead of trying to copy down all the slides (some lectures do just read off the slides but many will make additional comments or do other work on a whiteboard or similar which often has important or useful info). If there are any readings associated with a lecture (typical of humanities/social sciences courses) you should normally do them before lecture (at least skim through them to get a broad overview of what the piece is discussing). For STEM courses you should usually look at the syllabus to see what topic(s) will be lectured on in each lecture and review any relevant prerequisite material (which may be mathematical methods from other modules, related content from modules or A-levels done before etc.) before the lecture (so you aren't watching the lecturer work through some integral quickly but forgot how to do the t substitution they are using and get lost).