On the one hand it appears the tribe of Levi was granted their role as those who serve in the Mishkan/Beis Hamikdash from Bamibdar (3:12)
וַאֲנִ֞י הִנֵּ֧ה לָקַ֣חְתִּי אֶת־הַלְוִיִּ֗ם מִתּוֹךְ֙ בְּנֵ֣י יִשְׂרָאֵ֔ל תַּ֧חַת כָּל־בְּכ֛וֹר פֶּ֥טֶר רֶ֖חֶם מִבְּנֵ֣י יִשְׂרָאֵ֑ל וְהָ֥יוּ לִ֖י הַלְוִיִּֽם׃
I hereby take the Levites from among the Israelites in place of all the first-born, the first issue of the womb among the Israelites: the Levites shall be Mine.
which seems to imply that Levi only took on the role after the Golden Calf. However, the Chizkuni (Shemot 5:4) explains
באותה שעה נזכר שבטו של לוי מה שצוה יעקב בשעת פטירתו שלא ישאהו לוי לפי שהיה עתיד לשאת את ארון קודש ולא רצה לשעבד את עצמו ולא הכריחם פרעה, מיום ההוא והלאה הוקבע להיות משועבד כל מי ששעבד עצמו
At that time the tribe of Levi remembered what their founding father Yaakov had said to them on his death bed, that Levi was not to be one of his pall bearers as that tribe was destined in the future to carry the Holy Ark on its shoulders. They therefore declined at the time to participate in the building of fortifications, and Pharaoh did not make an issue of this as also the Egyptians had a caste of priests who Joseph during the years of famine had completely excused from any taxation.
which makes it seem like Levi had a greater role in serving Hashem in the Mishkan/Beis Hamikdash before the firstborn lost it.
Q: What was the role of Levi before the firstborn lost their service in the Mishkan?