Because no party has an outright majority, there are weeks of negotiations after the elections, as the parties try to find a compromise acceptable to a majority. Once a deal has been reached, the parliament votes to confirm it. If the vote fails, the parties return to negotiations.
Von der Leyen was chosen to head the Commission, because she was an acceptable compromise. All lead candidates had been tried before her, but all of them failed to obtain majority support in the negotiations.