It is the Riksdag that decides who becomes the Prime Minister.
The Speaker presents a proposal for Prime Minister to the Riksdag and states at the same time which parties will make up the Government. The Riksdag then takes a decision by holding a vote on the proposal. If more than half of the members of the Riksdag, that is at least 175 members, vote against the proposal, it is rejected. Otherwise it is approved.