Words mean different things in different contexts. Thus, the key word in Yoma, leharher, is defined by Jastrow as having three different word senses:
הִרְהֵר, הִירְ׳ (Pilp. of הרר; v. הָרָה, cmp. esp. Is. LIX, 13) 1) to conceive in mind, to think, meditate, plan. Ber. III, 4 מְהַרְהֵר בלבו thinks (recites the Sh’ma) in his heart, v. הִרְהוּר. Gitt. 57ᵇ הי׳ תשובה בדעתיה he conceived the idea of repentance. —2) to be heated, entertain impure thoughts. Ḥull. 37ᵇ לא הִרְהַרְתִּי ביום I allowed no impure thoughts to rise in me in day-time; a. fr. —3) (followed by אחר) to disparage, criticise, detract from. Snh. 110ᵃ המְהַרְהֵר אחר רבו who speaks evil of his teacher. Num. R. s. 7 אם הִרְהַרְתָּ וכ׳ if thou criticisest them &c. Ber. 19ᵃ אל תְּהַרְהֵר אחריו ביום do not think evil of him the day after (for he surely repented). Sifré Deut. 307 אין להַרְהֵר אחר מדותיו you must not criticise His dealings with man; a. fr. —4) to heat, make sick with fever. Lev. R. s. 17 (play on ח̇ר̇צבות, Ps. LXXIII, 4; v. ה"א) לא הִרְהַרְתִּים בחלאים (Var. חרחר׳; Ar. s. v. חרצב: ערער׳) I did not make them hot with diseases; Yalk. Ps. 808. [Ukts. III, 11, v. חרְחֵר.]
Word sense 3, which occurs when followed by the word אחר, means to disparage. He points to examples such as Sanhedrin 110a, where Rabbi Abahu speaks of one who thinks bad things about his own teacher:
א"ר חנינא בר פפא כל המתרעם על רבו כאילו מתרעם על השכינה שנאמר (שמות טז, ח) לא עלינו תלונותיכם כי (אם) על ה' א"ר אבהו כל המהרהר אחר רבו כאילו מהרהר אחר שכינה שנאמר (במדבר כא, ה) וידבר העם באלהים ובמשה
Rabbi Ḥanina bar Pappa says: Anyone who expresses resentment against his teacher for wronging him, it is as though he is expressing resentment against the Divine Presence, as it is stated: “Your murmurings are not against us, but against the Lord” (Exodus 16:8). Rabbi Abbahu says: Anyone who suspects his teacher of wrongdoing, it is as though he suspects the Divine Presence, as it is stated: “And the people spoke against God, and against Moses” (Numbers 21:5). The verse likens God and Moses with regard to this matter.
The gemara in Yoma 67a (Rav Steinsaltz's translation, on Sefaria):
דָּבָר אַחֵר: ״גְּזֵירָה״, שֶׁמָּא תֹּאמַר מַעֲשֵׂה תֹהוּ הוּא, תַּלְמוּד לוֹמַר: ״אֲנִי ה׳״, אֲנִי ה׳ גְּזַרְתִּיו, וְאֵין לְךָ רְשׁוּת לְהַרְהֵר בָּהֶן.
Alternatively, the word gezeira is written lest you say the procedure of the scapegoat is a meaningless act, since what sanctity and atonement is achieved in sending the goat to Azazel and pushing it from the cliff? Therefore, the verse states: “I am the Lord” (Leviticus 18:5), i.e., I, the Lord, decreed it [gezartiv], and you have no right to question it.
though acharav doesn't follow the word. Similarly, Artscroll renders it as no right to ponder them", but in footnote 10, writes "i.e. to question".
So too, the Chabad Tanach you eventually linked to above has a translation of Rashi. They write that this is the "English translation of the entire Tanakh (Tanach) with Rashi's commentary. This Hebrew Bible was edited by esteemed translator and scholar, Rabbi A.J. Rosenberg."
Rabbi Rosenberg translated that Rashi, and the gemara in Yoma that Rashi drew it from, thusly:
This is the statute of the Torah: Because Satan and the nations of the world taunt Israel, saying, “What is this commandment, and what purpose does it have?” Therefore, the Torah uses the term “statute.” I have decreed it; You have no right to challenge it. — [Yoma 67b]
Indeed, the Rambam you have linked to also has an English translation by Rabbi Eliyahu Tauger, and it also renders it "question", though you wrote that literally it means "think about". Other ideas developed in this chapter of the Rambam have to do with not regarding it "lightly" if you cannot find a reason for it, דָבָר שֶׁלֹּא יִמְצָא לוֹ טַעַם וְלֹא יֵדַע לוֹ עִלָּה אַל יְהִי קַל בְּעֵינָיו. Immediately after the hirhur quote is that the nations, and one's inclination, challenges these decrees, "וְאֵין לְךָ רְשׁוּת לְהַרְהֵר בָּהֶן. וְיִצְרוֹ שֶׁל אָדָם נוֹקְפוֹ בָּהֶן וְאֻמּוֹת הָעוֹלָם מְשִׁיבִין עֲלֵיהֶן". Question is unquestionably a good translation here.
The word is therefore "challenge", or "question", or "disparage". It does not need to mean "think about", in terms of figuring out the taamei hamitzvot.