I still have my 4790k too!
I swear basically everyone that bought one just never got rid of it.
Even now I’m thinking “I may need an upgrade… in a couple years”
So, voters elect Members of Parliament during general elections not a prime minister, the political party that wins the most seats in the House of Commons usually forms the government. Since we don’t elect the PM the king ‘invites’ the leader of the majority party to form a government since they’ll likely have the support of the majority portion of MPs, that person becomes the prime minister.
This leads to the slightly unusual situation where the incumbent party can essentially decide to replace the prime minister at will, this is usually accomplished by either an internal party process (1922 committee for the Conservative Party) or if the prime minister decides to ‘resign’. The incumbent party can then elect a party leader using whatever process they like iirc, once they have chosen a leader the king asks that person to become prime minister.
tl;dr the uk electorate don’t choose the prime minister directly, you elect a local MP, and the party leader of the majority party becomes PM so replacing the party leader replaces the prime minister.
ETA: the government can call a general election early and have done in the past but it’s not always in their best interest if they think they’re going to lose