The German election process involves two votes: a “first vote” for a local representative and a “second vote” for a party list. The overall membership of the Bundestag is proportional to the second vote.
The 5% threshold in the second vote must be met for a party to receive party list seats, unless they win three or more seats in the first vote or represent a minority ethnic group, after which coalition negotiations begin to elect the chancellor.