TL;DR - I worked 25-30 hours a week through my CS degree. The system: skip lectures, self-test for 3 days before exams, study in groups, sleep, one thing at a time.
During school I worked 25-30 hours per week, so this comes from practice, not theory.
Don't go to lectures. You learn theory much faster by actively testing yourself and doing things in practice - especially in the coding subjects.
Block 3 days before each test or final exam to study the subject in the most effective way possible: testing yourself and feeling the friction of learning. It will be hard and uncomfortable - that's how you know it's working. Passive reading is not learning.
Study in a group of locked-in people. Talk about the subject for hours, listen to your classmates, test each other. You absorb knowledge you'd never get alone.
Sleep well. Your brain processes and retains information while you sleep. Sacrificing sleep to study more is negative-sum.
One thing at a time. Don't run a project and exam prep in parallel - you'll do both badly. Focus on one, finish it, switch.