Depends on the process, chosen for that project.
In real Scrum, the Product Owner is the one that prioritizes the product backlog. However, it is the Development Team that decides how many of the prioritized stories it can fit in the upcoming Sprint.
Usually that would happen in the first session of the Sprint Planning, when the PO presents his choice of stories for the Sprint. The development team then estimates and re-negotiates if necessary the order and amount of the stories they agree to work on in that same Sprint.
So, it is the PO that prioritizes, but it is the development team that has the final saying what goes in the sprint backlog.
A common scenario =================
A common scenario
1. Sprint Planning - Session 1
PO & Development Team meet and discuss. PO presents the order of all the stories in the product backlog, he wants to see in the upcoming Sprint. Development team
- agrees or
- re-negotiate the order/number of stories or
- refuse to include one or more stories in the Sprint
2. Sprint Planning - Session 2
PO & Dev.Team have agreed on the number and order of stories that will be worked on during the sprint (they have defined the Sprint Backlog). The Dev.Team decides how to work on each story. At that point they no longer need the PO at the meeting.