Nadab and Abihu died before their father - that is, not in his presence, but during his lifetime (see Num 3:4; Num 26:61).
therefore Eleazar and Ithamar executed the priest’s office - In consequence of the death of his two oldest sons without issue, the descendants of Aaron were comprised in the families of Eleazar and Ithamar. Both of these sons discharged the priestly functions as assistants to their father. Eleazar succeeded him, and in his line the high priesthood continued until it was transferred to the family of Ithamar, in the person of Eli.