How can I change in Illustrator the stem width of the "2" to have similar to "0"?
If your shapes happen to be text objects and you want to keep them as text objects, your only option is to make yourself or find a font that has the wanted 0 and 2. Making it yourself needs a font editor. There's no function in Illustrator that makes fonts slimmer in the way you hoped. See NOTE1 at the end.
Then some guessing:
Your zero is obviously isn't text. It's a modified version. It's outlined and pieces of the original 0 are sliced off. See (1) in the following screenshot:
I stacked 2 and 0. My 2 is your 2, but traced and with no fill.
If you want a same looking 2 as your 0, you must outline the 2, too, if it still is text and subtract exessive pieces off. Letter as text objects are closed paths, they are not curved single lines even in this case.
I made the opposite. I drew two rounded rectangles (2) and combined them to compound path (= Illustrator's way to make a hole). After removing the stroke and inserting pink fill (3) I got a new zero which matches well with your 2.
Your 2 happens to be simple enough to be drawn with the pen as a single curved line. Stroke ends are rectangular. I tried it, too:
NOTE1: Fonts are computer software. Making own versions of a font can be illegal. The copyright owners give strict rules how their fonts can be used. Paying the price generally gives only a right to use the font as is. Free fonts can be modified only if it's allowed in the license.