There are essentially two ways to democratically appoint an executive (i.e. head of state or head of government): either have it be a separate election or have it be coupled to the election of the legislative (parliament).
The first system is the one the United States or France uses. In the US, the corresponding parts of the Constitution are in Article 2:
The executive Power shall be vested in a President of the United States of America. He shall hold his Office during the Term of four Years, and, together with the Vice President, chosen for the same Term, be elected, as follows: Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors, equal to the whole Number of Senators and Representatives to which the State may be entitled in the Congress: but no Senator or Representative, or Person holding an Office of Trust or Profit under the United States, shall be appointed an Elector.
In France, the current article 6 of the Constitution states as follows (including my translation):
Le Président de la République est élu pour cinq ans au suffrage universel direct.
Nul ne peut exercer plus de deux mandats consécutifs.
Les modalités d'application du présent article sont fixées par une loi organique.
The President of the Republic is elected for five years by universal direct suffrage.
Nobody can be elected to more than two consecutive terms.
The modalities of the application of this article are determined by law.
Both these constitutions have a formal mechanism for removal of the President. In the United States, this is the process known as Impeachment (actually Impeachment followed by Trial in the Senate). In France, there is a similar process where a High Court can be convened from both Houses of Parliament. However, if the President is removed according to one of these processes, the parliament cannot designate a successor. Rather, in the US the Vice President become President and so on down the line of Presidential succession; I was unable to immediately identify what would happen in France but I would assume that a Presidential election would be called rapidly to fill the vacancy.
These are presidential systems and, as you suggest in the question, require a public vote to install a person not already part of the previous administration in some capacity.
The second system is followed in countries such as Germany or Japan. In Germany, the position of head of government is known as the Chancellor; in Japan, it is the Prime Minsiter.
In Germany, the relevant constitutional text is written in Article 63 of the Basic Law (Grundgesetz):
(1) Der Bundeskanzler wird auf Vorschlag des Bundespräsidenten vom Bundestage ohne Aussprache gewählt.
(2) Gewählt ist, wer die Stimmen der Mehrheit der Mitglieder des Bundestages auf sich vereinigt. Der Gewählte ist vom Bundespräsidenten zu ernennen.
(3) Wird der Vorgeschlagene nicht gewählt, so kann der Bundestag binnen vierzehn Tagen nach dem Wahlgange mit mehr als der Hälfte seiner Mitglieder einen Bundeskanzler wählen.
(4) Kommt eine Wahl innerhalb dieser Frist nicht zustande, so findet unverzüglich ein neuer Wahlgang statt, in dem gewählt ist, wer die meisten Stimmen erhält. Vereinigt der Gewählte die Stimmen der Mehrheit der Mitglieder des Bundestages auf sich, so muß der Bundespräsident ihn binnen sieben Tage nach der Wahl ernennen. Erreicht der Gewählte diese Mehrheit nicht, so hat der Bundespräsident binnen sieben Tage entweder ihn zu ernennen oder den Bundestag aufzulösen.
Translation by Christian Tomuschat and David P. Currie:
(1) The Federal Chancellor shall be elected by the Bundestag without debate on the proposal of the Federal President.
(2) The person who receives the votes of a majority of the Members of the Bundestag shall be elected. The person elected shall be appointed by the Federal President.
(3) If the person proposed by the Federal President is not elected, the Bundestag may elect a Federal Chancellor within fourteen days after the ballot by the votes of more than one half of its Members.
(4) If no Federal Chancellor is elected within this period, a new election shall take place without delay, in which the person who receives the largest number of votes shall be elected. If the person elected receives the votes of a majority of the Members of the Bundestag, the Federal President must appoint him within seven days after the election. If the person elected does not receive such a majority, then within seven days the Federal President shall either appoint him or dissolve the Bundestag.
The key difference to the Presidential system as highlighted above is that it is parliament (the Bundestag or Federal Diet) that elects the Chancellor; typically by absolute majority. Another key difference is the process of removal. In the German Basic Law the relevant article is article 67:
(1) Der Bundestag kann dem Bundeskanzler das Mißtrauen nur dadurch aussprechen, daß er mit der Mehrheit seiner Mitglieder einen Nachfolger wählt und den Bundespräsidenten ersucht, den Bundeskanzler zu entlassen. Der Bundespräsident muß dem Ersuchen entsprechen und den Gewählten ernennen.
(2) Zwischen dem Antrage und der Wahl müssen achtundvierzig Stunden liegen.
Translation by the same as above:
(1) The Bundestag may express its lack of confidence in the Federal Chancellor only by electing a successor by the vote of a majority of its Members and requesting the Federal President to dismiss the Federal Chancellor. The Federal President must comply with the request and appoint the person elected.
(2) Forty-eight hours shall elapse between the motion and the election.
Not only does parliament vote a person into office, they also have the power to remove said person by voting for somebody else with the same absolute majority.
Without being able to provide the appropriate legal texts I will assure you that the system is the same in Japan: The Prime Minister is elected by both chambers of the National Diet agreeing on one person by majority vote. Equally, if the majority in the Diet is no longer content with the person holding the office, they can elect a new person into office by the same majority whenever they feel like it &endash; which is exactly what happened when Abe retired last year and was replaced by Suga.
As the power to appoint the head of government in these cases is vested in the legislative (i.e. parliaments), these systems are typically known as parliamentary systems.
So where does Israel fall in here? The key player, i.e. the head of government, is the Prime Minister. How the Prime Minister is elected is determined by the corresponding Basic Law (one of Israel's laws of constitutional status). Wikipedia summarises the main parts as follows:
- 5–6: "The Government is composed of a Prime Minister and other ministers.... The Prime Minister shall be a member of the Knesset... A Minister need not be a member of the Knesset [he may be] ... A Minister must be an Israeli citizen and a resident of Israel."
- 7: "When a new Government has to be constituted, the President of the State shall, after consultation with representatives of party groups in the Knesset, assign the task of forming a Government to a Knesset Member who has notified him that he is prepared to accept the task; the President shall do so within seven days of the publication of the election results, or should the need arise to form a new government; and in the case of the death of the Prime Minister, within 14 days of his death."
- 28: "The Knesset may adopt an expression of no confidence in the Government... An expression of no confidence in the Government will be by a decision adopted by the majority of the Members of Knesset to request that the President assign the task of forming a Government to a certain Knesset member who gave his written consent thereto... If the Knesset has expressed no confidence in the Government, the Government shall be deemed to have resigned."
- 29: "the Prime Minister... may, with the approval of the President of the State, disperse the Knesset ... and the Government shall be deemed to have resigned."
It follows that it is essentially the Knesset (i.e. parliament) that elects the Prime Minister. Provision 28 highlights how the Knesset may choose to entrust a new person with this office without a parliamentary election having taken place. Israel follows the second paradigm, it is a parliamentary republic.
As Israel is a parliamentary system, it is important to take a look at the election results. As others have already pointed out, neither Netanyahu nor Bennett nor Lapid won an outright majority with their party in the last election &endash; which is normal in Israel where a large number of parties compete for seats in the Knesset, not entirely dissimilar to the situation in Germany where the last outright majority was gained in the 1950's. Thus, whoever desires to become Prime Minister must form a coalition made up of multiple parties.
Currently, Netanyahu is only acting Prime Minister as he has not been formally re-elected following the latest elections earlier this year. Thus, the coalition whose formation has been annouced recently is the result of said election result. However, even in the absence of an election it would have been possible for a majority in the Knesset to topple the incumbent Prime Minister and appoint a successor government; a typical situation would be a small-ish party switching sides, no longer supporting the incumbent but instead deciding to support the current opposition.