TL;DR - I just finished my CS degree. Most subjects fade after the exam; these five keep paying off in real work. If you're going through a CS degree, give them your maximum attention.
1. Software Engineering
Learning how to read diagrams and understanding the stages of software development is essential for your career. Pay attention when they explain the different types of diagrams. Software is moving so fast that soon everything will be communicated through diagrams - reading them is becoming a meta-skill.
The second half is the development models: the V-model, the waterfall model, agile. Whether you want to found a startup or work at an established company, knowing how software actually gets developed is one of the highest-leverage things you can learn.
2. Computer Networks
Protocols. How DNS works, ports, IP addresses, certificate authorities. This is pure domain knowledge, and it compounds. After finishing the degree I realized I can now build things I simply couldn't have built before this subject. The absolute GOAT of subjects - dive deep into it.
3. Operating Systems
If you want to build secure applications, one of the core skills is knowing how the operating system works - especially Linux.
If I could go back, I would dive even deeper here: how netplan works, how LUKS disk encryption works, the internals underneath the commands. The OS is fundamental to security. If you want to get into security, learn the OS first.
4. Algorithms
You need to learn Big-O notation, because otherwise the algorithms you produce will be slow and you won't understand why. When algorithms show up in your curriculum, don't rush it. Understand hash maps, binary trees, the classics. It's some of the best knowledge in the whole degree.
5. Automata Theory
The best for last. Automata theory is basically state diagrams - state management and flow. And it maps directly to real application development: your application is a data flow, and the automaton is that data flow.
Learning it changed how I code. To get an automaton right, you have to handle every transition - every edge case. I started fixing edge cases in my own code the same way. That gave me an edge.