Starting with a source from Parashat Metzora in Vayikra:
(א) וַיְדַבֵּ֥ר יְהֹוָ֖ה אֶל־מֹשֶׁ֥ה לֵּאמֹֽר׃ (ב) זֹ֤את תִּֽהְיֶה֙ תּוֹרַ֣ת הַמְּצֹרָ֔ע בְּי֖וֹם טׇהֳרָת֑וֹ וְהוּבָ֖א אֶל־הַכֹּהֵֽן׃ (ג) וְיָצָא֙ הַכֹּהֵ֔ן אֶל־מִח֖וּץ לַֽמַּחֲנֶ֑ה וְרָאָה֙ הַכֹּהֵ֔ן וְהִנֵּ֛ה נִרְפָּ֥א נֶֽגַע־הַצָּרַ֖עַת מִן־הַצָּרֽוּעַ׃ (ד) וְצִוָּה֙ הַכֹּהֵ֔ן וְלָקַ֧ח לַמִּטַּהֵ֛ר שְׁתֵּֽי־צִפֳּרִ֥ים חַיּ֖וֹת טְהֹר֑וֹת וְעֵ֣ץ אֶ֔רֶז וּשְׁנִ֥י תוֹלַ֖עַת וְאֵזֹֽב׃ (ה) וְצִוָּה֙ הַכֹּהֵ֔ן וְשָׁחַ֖ט אֶת־הַצִּפּ֣וֹר הָאֶחָ֑ת אֶל־כְּלִי־חֶ֖רֶשׂ עַל־מַ֥יִם חַיִּֽים׃ (ו) אֶת־הַצִּפֹּ֤ר הַֽחַיָּה֙ יִקַּ֣ח אֹתָ֔הּ וְאֶת־עֵ֥ץ הָאֶ֛רֶז וְאֶת־שְׁנִ֥י הַתּוֹלַ֖עַת וְאֶת־הָאֵזֹ֑ב וְטָבַ֨ל אוֹתָ֜ם וְאֵ֣ת ׀ הַצִּפֹּ֣ר הַֽחַיָּ֗ה בְּדַם֙ הַצִּפֹּ֣ר הַשְּׁחֻטָ֔ה עַ֖ל הַמַּ֥יִם הַֽחַיִּֽים׃ (ז) וְהִזָּ֗ה עַ֧ל הַמִּטַּהֵ֛ר מִן־הַצָּרַ֖עַת שֶׁ֣בַע פְּעָמִ֑ים וְטִ֣הֲר֔וֹ וְשִׁלַּ֛ח אֶת־הַצִּפֹּ֥ר הַֽחַיָּ֖ה עַל־פְּנֵ֥י הַשָּׂדֶֽה׃ (ח) וְכִבֶּס֩ הַמִּטַּהֵ֨ר אֶת־בְּגָדָ֜יו וְגִלַּ֣ח אֶת־כׇּל־שְׂעָר֗וֹ וְרָחַ֤ץ בַּמַּ֙יִם֙ וְטָהֵ֔ר וְאַחַ֖ר יָב֣וֹא אֶל־הַֽמַּחֲנֶ֑ה וְיָשַׁ֛ב מִח֥וּץ לְאׇהֳל֖וֹ שִׁבְעַ֥ת יָמִֽים׃ (ט) וְהָיָה֩ בַיּ֨וֹם הַשְּׁבִיעִ֜י יְגַלַּ֣ח אֶת־כׇּל־שְׂעָר֗וֹ אֶת־רֹאשׁ֤וֹ וְאֶת־זְקָנוֹ֙ וְאֵת֙ גַּבֹּ֣ת עֵינָ֔יו וְאֶת־כׇּל־שְׂעָר֖וֹ יְגַלֵּ֑חַ וְכִבֶּ֣ס אֶת־בְּגָדָ֗יו וְרָחַ֧ץ אֶת־בְּשָׂר֛וֹ בַּמַּ֖יִם וְטָהֵֽר׃
(1) יהוה spoke to Moses, saying: (2) This shall be the Instruction for a leper at the time of being purified. When it has been reported to the priest, (3) the priest shall go outside the camp. If the priest sees that the leper has been healed of the scaly affection, (4) the priest shall order two live pure birds, cedar wood, crimson stuff, and hyssop to be brought for the one to be purified. (5) The priest shall order one of the birds slaughtered over fresh water in an earthen vessel; (6) and he shall take the live bird, along with the cedar wood, the crimson stuff, and the hyssop, and dip them together with the live bird in the blood of the bird that was slaughtered over the fresh water. (7) He shall then sprinkle it seven times on the one to be purified of the eruption and effect the purification; and he shall set the live bird free in the open country. (8) The one to be purified shall wash those clothes, shave off all hair, and bathe in water—and then shall be pure. After that, the camp may be entered but one must remain outside one’s tent seven days. (9) On the seventh day all hair shall be shaved off—of head, beard [if any], and eyebrows. Having shaved off all hair, the person shall wash those clothes and bathe the body in water—and then shall be pure.
Now focusing on Parashat Nasso:
(2) Instruct the Israelites to remove from camp anyone with an eruption or a discharge and anyone defiled by a corpse. (3) Remove male and female alike; put them outside the camp so that they do not defile the camp of those in whose midst I dwell.
(כט) זֹ֥את תּוֹרַ֖ת הַקְּנָאֹ֑ת אֲשֶׁ֨ר תִּשְׂטֶ֥ה אִשָּׁ֛ה תַּ֥חַת אִישָׁ֖הּ וְנִטְמָֽאָה׃ (ל) א֣וֹ אִ֗ישׁ אֲשֶׁ֨ר תַּעֲבֹ֥ר עָלָ֛יו ר֥וּחַ קִנְאָ֖ה וְקִנֵּ֣א אֶת־אִשְׁתּ֑וֹ וְהֶעֱמִ֤יד אֶת־הָֽאִשָּׁה֙ לִפְנֵ֣י יְהֹוָ֔ה וְעָ֤שָׂה לָהּ֙ הַכֹּהֵ֔ן אֵ֥ת כׇּל־הַתּוֹרָ֖ה הַזֹּֽאת׃
(29) This is the Instruction in cases of jealousy, when a woman goes astray while living in her husband’s household, and defiles herself, (30) or when a fit of jealousy comes over a husband and he is wrought up over his wife: the woman shall be made to stand before יהוה and the priest is to perform regarding her according to all this Instruction.
(כא) זֹ֣את תּוֹרַ֣ת הַנָּזִיר֮ אֲשֶׁ֣ר יִדֹּר֒ קׇרְבָּנ֤וֹ לַֽיהֹוָה֙ עַל־נִזְר֔וֹ מִלְּבַ֖ד אֲשֶׁר־תַּשִּׂ֣יג יָד֑וֹ כְּפִ֤י נִדְרוֹ֙ אֲשֶׁ֣ר יִדֹּ֔ר כֵּ֣ן יַעֲשֶׂ֔ה עַ֖ל תּוֹרַ֥ת נִזְרֽוֹ׃ {פ}
(21) This is the Instruction regarding a nazirite, who vows an offering to יהוה of what they can afford, aside from what one's hand can reach: according to the vow that one has vowed, thus is one to make, in addition to the instructed requirements of one's consecration.
There is very similar language using the metzora mentioned in Parashat Metzora (which is brought up again in Parashat Nasso) and the Sotah and Nazir mentioned in Parashat Nasso. There are also some similarities between the situations these people find themselves in (or put themselves in).
They represent different sins… lashon hara, adultery, and the Nazir is told to bring a sin offering despite that one would think what the Nazir did by completing their vow was a good thing. Perhaps they represent the quality of overpiousness, going above and beyond in abstaining from things that can be enjoyed in moderation.
Tzaraat isn’t gendered, it specifically mentions both male and female people with tzaraat, then sotah is mentioned which is very gendered, and then the nazir is mentioned, which the Torah also mentions as being both male and female.
The metzora, sotah, and nazir all are in some way excluded from the camp, whether literally or figuratively. With the possible exception of the Sotah if she actually gets to the point of the ritual and is guilty of adultery, there’s a path involving the Cohenim for the party that is excluded to rejoin the camp. The exclusion isn’t necessarily permanent, there is a path of repair.