I tutored so I’ll tell you what these students did. Your study area is crucial. I’d invest in a good workstation. You can probably get one free or from a second-hand store. So it’s not an expensive requirement per se.
You need to be able to program, search a hardcover textbook, and google COMFORTABLY. So maybe a chair that easily moves around the workstation.
A lot of professors tell you that you need to make sure there are no distractions such as music, movies, noises etc.
Make sure and make as many friends as possible unless you’re naturally brilliant. Because you will get stuck on a regular basis and will need help.
Most top students have parents that are programmers unless they are super brilliant. Others have programming buddies that help. If you have none of these, you’ll need a tutor. 70% of people I’ve tutored have been B and higher grade students.
If you get anxiety during homework assignments and start looking for google solutions, I’d drive to your university CS lab and do the homework there. Make friends with everybody at the lab in case you get stuck!!! Don’t be cheap, if people are helping you, make sure and order some pizza. Don’t build a reputation as a taker!!! If someone is super helpful and they really enjoy helping you, they just might be your tutor. Ask if they want to help for a fee!