Positive commandment · Mitzvat Aseh #223 of 613
To carry out the [procedure] prescribed for a sotah
לעשות לסוטה כתורה
The verse · Bamidbar 5:30
אוֹ אִישׁ אֲשֶׁר תַּעֲבֹר עָלָיו רוּחַ קִנְאָה וְקִנֵּא אֶת־אִשְׁתּוֹ וְהֶעֱמִיד אֶת־הָאִשָּׁה לִפְנֵי ה׳ וְעָשָׂה לָהּ הַכֹּהֵן אֵת כׇּל־הַתּוֹרָה הַזֹּאת
“or when the spirit of jealousy comes upon him, and he be jealous of his wife, and shall set the woman before the Lord, and the priest shall execute upon her all this Tora:”
The Rambam’s words
To carry out the [procedure] prescribed for a sotah, as [Numbers 5:30] states: "And the priests will carry out all these laws for her."
לעשות לסוטה כתורה, שנאמר: "ועשה לה הכוהן, את כל התורה הזאת" (במדבר ה,ל).
Why · Sefer HaChinuch #365
Suspected adulteress (sotah) for the husband to bring her to the priest and that he do to her according to the statute that is written
“The root of this commandment is revealed to all that see the sun: that it is a great benefit within the nation that we have a mechanism to remove suspicion about our wives from our hearts and to truly know if she was unfaithful from her husband, which is impossible for any nation or country to have [something] like this among them.”
Who & when
“And this commandment is practiced at the time of the Temple by males, as it is incumbent upon them to do this process to women to test them, if they see that they require it.”
Where in the Mishneh Torah
Hilchot Woman Suspected of Infidelity הלכות סוטה