Chabad.org — English translation + Rashi
Torah Temimah emphasizes the protective function: the Levites’ presence prevents “נגף” when Israel approaches the Holy.
English: “So that there be no plague among the children of Israel when the children of Israel approach the Holy” — the Levites’ appointed service is the mechanism that averts that danger.
Category D — Conceptual / logical / legal / theological / ethical inference.
Method: The verse states the consequence prevented by the Levites’ assigned role: Israel is protected from a plague when approaching the sanctuary. The learning is the protective function that follows from the Levites’ placement and service.
Textual trigger: “וְלֹא יִהְיֶה בִּבְנֵי יִשְׂרָאֵל נֶגֶף בְּגֶשֶׁת בְּנֵי יִשְׂרָאֵל אֶל־הַקֹּדֶשׁ” (Bamidbar 8:19).
Approach to the sacred requires an appointed intermediary class; without them the same approach would be fatal.