Most people go to university with an attitude that "It will teach me how to program", they get there and, what do you know? Almost everything is taught in such a boring manner that it all feels utterly useless and you just remain (yes, passively) 3 years or more so you can pass all the classes.
Nobody can ever teach you something
Read this a few more times and drill it into your head. If the teacher is entertaining and the subject looks useful you start learning but when the teacher is as monotone as Microsoft Sam or the subject looks completely useless what do you do?
Should you blame the teacher, faculty, university and everything in between that you are not being taught properly OR take matters into your own hands and start learning because nobody can ever teach you something?
You are the one making the effort of paying attention and processing the information you are being given. Yes, you are the one learning it's just that, sometimes it doesn't feel like effort on our part.
Be it from a teacher, from a book or from a YouTube video understand that you are always the one responsible for paying close attention and it mostly depends on you for learning something.
Of course, if the teacher spouts nonsense related to the subject get another source of information or if the subject looks useless analyze it closely, it might not be as useless as it sounds. It all depends on you!