Why sprint planning is important?
Sprint planning is done together as a team: the team agrees on what is their commitment for the next sprint (be it one week or two or something else). Plannings are important to estimate and track progress.
How is planning done?
Simply put, the team aims to put as many of the highest priority tasks they have into the sprint as they have capacity for. Capacity is usually estimated based on the performance of the team in previous sprints. In our project subject, we use time estimates on tasks, so we can estimate the tasks that have to be done (/estimate in the issue's comments in GitLab), and take enough tasks into the sprint to have about an equal amount of time booked for each team member. Generally in Agile, tickets are not distributed among team members during planning but you can do that to make the planning easier. One thing to also keep in mind, is that ideally the tasks assigned to different people would not block oneanother if at all possible, because then work can be done in parallel and no one has to wait for others to finish.
It can sometimes happen that a ticket seems too big - in our case if the time estimate for a ticket is more than one day, you and your team should consider splitting the ticket into multiple smaller ones. Smaller tickets are cleared and easier to estimate. And smaller merge requests are less horrible to review.
In order to improve your planning skills for the future, you should also track and log time on your completed issues (/spend in the issue's comments in GitLab). Tracking time is used at work to bill customers (if you are working at a software development service company) but it can also help improve planning accuracy. If you see that a ticket you initially estimated at 4h but it actually took significantly less or more, you are now more aware of how to estimate similar work in the future, leading to more successful sprint plannings and sprints.
Discuss every task going into the sprint within the team to make sure everyone understands what needs to be done in the scope of the task, and it's not blocked by anything else.
The sprint goal
Try to set a goal for your sprint, which is your team's main focus during the time period of the sprint. Although the team should still strive to complete all the issues planned for the sprint, the work related to the sprint goal has the highest priority.
Adding work to the sprint
Generally, additional work is not added to the sprint, unless everything in the sprint is completed (meaning the code is written, it has passed code review and it has been merged to the main branch). Sometimes critical issues are added if there is an incident or a bug that significantly affects the customer experience, which cannot wait for the next sprint.