Focus on understanding the material and getting “good enough” marks.
This will be really obvious once you’re out of school 3+ years.
I now look back and think “why the hell was I trying so hard, that shit means nothing now”
It’s hard to understand that though if your identity is based on being “the smart one”.
You’re much better off putting that time into LeetCode or side projects or just having fun.
The second thing is it’s much much easier to get into a specific area of software development as an intern.
So if you’re interested in something specific that isn’t web dev like ML/graphics/compilers try to intern in that area.
It’s a lot harder to switch areas once you’re not a new grad because you’re expected to be able to just deliver without months of ramp up.
Also, watch the SICP video series https://www.youtube.com/watch?v=2Op3QLzMgSY if you haven't yet read the book -- it's quite a gentle introduction.
Good luck!
Don't worry about making the "wrong" plan, you can always change later. But having a plan is far better than having nothing.
The right play would have been to attend the local university extension, and do a few startups while I still had no debts, and could live with my parents.