Electing them by popular vote is "direct election". It is true that many countries do that:
https://www.pewresearch.org/fact-tank/2016/11/22/among-democ...
However, many countries also do not do it -- and many countries elect a "president" who does not directly control the executive branch, while indirectly electing a "prime minister" or "chancellor" with such control (as in Austria or France).
In many cases, the prime minister is appointed by the president, and in some cases, they could theoretically appoint almost any adult citizen they want; but in practice, they have to elect someone that the legislature is going to accept and work with; and in many cases, the legislature can bring about a vote of no confidence and cause the government to fall.
There are a lot of details here and it seems like a matrix of four to ten columns might be needed to meaningfully get even a bird's eye view.