Like when Churchill replaced Chamberlain. Who is the Churchill for 2018-19
The Conservative Party does not have 326 MPs, they only have 315. They govern with a confidence and supply agreement with the Democratic Unionist Party, which has 10 seats.
So, whoever replaces May is not entitled BY RIGHT to the Queen’s appointment. It is likely, but not certain, that the elected leader of the Tories will be OFFERED the Prime Ministership, IF he or she can form a majority coalition or can govern without failing a confidence vote.
But, given the lack of a majority party in the Commons and the absolute wreck the Tories have made of government, the Queen does have options.