EXPLAINED: Why far-right leader Jimmie Åkesson won't be Sweden's new PM

Why isn't the leader of the largest party (the Social Democrats) or the second-largest party (the Sweden Democrats) going to be Prime Minister, with the role instead going to the leader of the third-largest party, the Moderates?

EXPLAINED: Why far-right leader Jimmie Åkesson won't be Sweden's new PM
Why isn't the leader of the largest party (the Social Democrats) or the second-largest party (the Sweden Democrats) going to be Prime Minister, with the role instead going to the leader of the third-largest party, the Moderates?