How is the Prime Minister chosen?

The leader of the party with the most elected representatives becomes the Prime Minister.

The Queen appoints the Prime Minister.

The Governor General with the Senate appoint the Prime Minister

The MPs vote on the Prime Minister