A supplement to CDJB's answer:
The term "By-Election" for German "Nachwahl" is used in this older English version of the Bundeswahlgesetz. But there are some peculiarites that might make the translation misleading.
(The translation is older, but the text of Section 43 has not changed since then.)
Section 43 By-Election
(1) A by-election shall take place
- if an election has not been held in a constituency or a polling district,
- if a constituency candidate dies after the approval of the constituency nomination
but before the election.
(2) The by-election shall take place not later than three weeks after the day of the general
election if subsection (1) number 1 applies. It may be held on the day of the general
election and shall take place not later than six weeks after the day of the general election
if subsection (1) number 2 applies. The date of the by-election shall be set by the Land
Returning Officer.
(3) The by-election shall take place in accordance with the same regulations and on the
same basis as the general election.
(4) In the case of a by-election, the provisional result of the general election shall be
determined, established and released immediately after the general election has been
held on the basis of the votes cast.
Either there was no original election held (for whatever reasons), or the "By-Election" is held within six weeks of general election day. In this case (when a candidate dies before election day), the original election might have been taken place, but only the provisional result will be published. A consequence of this is that the Federal Returning Officer will never notify the winner of that first election, and they will not attain membership of the German Bundestag (§ 42 subsection (2) and (3)).
The By-Election therefore does not replace a member of the Bundestag, but fills an initially empty seat.
Applications of that rule are rare. Wikipedia cites three occurences since 1949, the last one in the Dresden I electoral constituency in 2005. That election caused a public discussion about the theoretical possibility of negative vote weight. (It did not occur, but because of the Apportionment paradox a member of the CDU in Northrhine-Westphalia lost his seat in favor of a member of the same party in Saarland.) Also, the provision in subsection (4) about the publication of provisional results was critizised as creating an inequality between voters, as the Dresden electorate had more knowledge about the outcome of the general election than any other voters.