As far as I am aware, the Queen has a role to play here. She will call the Leader of the party with the most seats, to Buck House, and ask that party Leader to form a Government. I don't know of an occasion in modern times when anybody other than the Leader has gone on to PM. There was a time when Lord sombodyorother led his Party from the House of Lords. I suppose anybody could become a Leader of a winning party after election, but, again The Queen would be involved, as head of state.