@hazelnot @W_Lucht She was elected by the heads of state and the EU Parliament. It's an indirect election. In some EU countries, like for instance Italy or Germany, the Prime Minister/Chancellor isn't directly elected by the population. The vote goes to a party and it is up to the winning coalition (the ruling PMs) to choose the chief of the executive power.
Another key difference is that the EU executive power is held by both the Council and the Commission.