Hi, in my first 2 years at uni in CS I averaged a 2:1, I put in the work but not a super amount. In my final year I pulled this up to a 1st but took a lot of time and effort. If you're looking for a 1st, you'll need to put in the work especially if you leave it too late like I did. It's certainly not impossible, but make sure to review your grades (a simple spreadsheet or notepad is great for this) and see when and where you need to push yourself (check your feedback, it'll usually break down your grade telling you where you need to improve).
The grading system at Uni works like this: <40% = fail, 40-49% = 3rd, 50-59% = 2:2, 60-69% = 2:1, 70%+ = 1st. Usually modules are graded differently, but the uni should give you information about exactly how this is done when you start. Mine was 70% of my module grade was one big task, and 30% of my module grade was a few smaller tasks. With each task I was provided how much each part of the task was worth, it's useful to know but don't focus all your time on specific sections and miss some out. You should be given all of this information with the assignment.
Doing the lab exercises is absolutely essential, and don't leave your coursework till last minute. Make sure to ask for feedback and help, it's incredibly valuable to know your strengths and weaknesses! Some lecturers also offer some varied level of feedback before you submit it, if you lecturer offers this - take it! I found this so incredibly useful.
Good luck!