At most universities first year doesn't count, or does not count much, towards your final classification. So the main issue is just, making sure you are comfortable with the content of the first year, at least as much as is used in latter years of the course. You don't need to repeat the year to do this, you just need to actually take responsibility for your own learning to study the material over the summer and during second year as and when necessary and possible.
University isn't like school; generally you can't retake things endlessly to try and get a better grade, and you are the one who is responsible for your learning and you need to be an active participant in that. Simply going to lectures and doing coursework etc, is not enough. However, universities are generally aware there is a shift from school to university level working, hence as above the first year usually doesn't count much if at all towards you final classification. Use this as an opportunity to reflect on your approach to your work and develop strategies to improve that.