In Mishnei Torah Hilchot Talmud Torah chapter 3 Halacha 1 the Rambam writes:
בִּשְׁלשָׁה כְּתָרִים נִכְתְּרוּ יִשְׂרָאֵל. כֶּתֶר תּוֹרָה וְכֶתֶר כְּהֻנָּה וְכֶתֶר מַלְכוּת. כֶּתֶר כְּהֻנָּה זָכָה בּוֹ אַהֲרֹן שֶׁנֶּאֱמַר (במדבר כה יג) "וְהָיְתָה לּוֹ וּלְזַרְעוֹ אַחֲרָיו בְּרִית כְּהֻנַּת עוֹלָם".
Three crowns were conferred upon Israel: the crown of Torah, the crown of priesthood, and the crown of royalty. Aaron merited the crown of priesthood, as [Numbers 25:13] states: "And it will be an eternal covenant of priesthood for him and his descendants after him."
If we look at the verse the Rambam is quoting, it’s in reference to Pinchas getting priesthood because of his zealous action, nothing to do with Aaron getting priesthood. So why is the Rambam taking a verse from Pinchas instead of taking a pasuk from Shemot when Hashem gave Aaron priesthood to prove how Aaron got priesthood!?
The verse should have been taken from 40:15.
וּמָשַׁחְתָּ אֹתָם כַּאֲשֶׁר מָשַׁחְתָּ אֶת אֲבִיהֶם וְכִהֲנוּ לִי וְהָיְתָה לִהְיֹת לָהֶם מׇשְׁחָתָם לִכְהֻנַּת עוֹלָם לְדֹרֹתָם.
Note that the Rambam is taking this from Avot DeRebbi Natan (41:1), so even if you want to answer that the Rambam always brings the most clear verse and that’s why he used Pinchas, the question still stands to Avot DeRebbi Natan as to why this specific verse on Pinchas is being applied to Aaron