Parashas Bamidbar
וַיָּ֣מׇת נָדָ֣ב וַאֲבִיה֣וּא לִפְנֵ֣י יְהֹוָ֡ה בְּֽהַקְרִבָם֩ אֵ֨שׁ זָרָ֜ה לִפְנֵ֤י יְהֹוָה֙ בְּמִדְבַּ֣ר סִינַ֔י וּבָנִ֖ים לֹא־הָי֣וּ לָהֶ֑ם וַיְכַהֵ֤ן אֶלְעָזָר֙ וְאִ֣יתָמָ֔ר עַל־פְּנֵ֖י אַהֲרֹ֥ן אֲבִיהֶֽם׃ {פ}
But Nadab and Abihu died by GOD’s will,aby GOD’s will Lit. “before GOD.” when they offered alien fire before GOD in the wilderness of Sinai; and they left no sons. So it was Eleazar and Ithamar who served as priests in the lifetime of their father Aaron.
Torah Temimah points to Abba Chanan in the name of R’ Elazar — Yevamos 63b / related (verified).
ובנים לא היו להם — תניא, אבא חנן משום ר׳ אלעזר: כל מי שאינו עוסק בפריה ורביה חייב מיתה.
English: “And they had no children” — it was taught: Abba Chanan in the name of R’ Elazar: Anyone who does not engage in being fruitful and multiplying is liable to death.
Custom
Chazal connect the note that Nadav and Avihu had no children to the gravity of neglecting the mitzvah of procreation.