I’ve done trials with 45, 60, 70, 80, 90 mm stems and different bar width combos.
Both the frames I have, I cannot go any shorter than 70 mm stem (70 for one 80 the other) as I am close to the top of the height recommendation for the frame size, in between sizes I suppose. At 45 mm, one bike the bars nearly hit my knees on sharp turns and it felt like I was sat on the handlebar, unseated peddling I was hanging over the front wheel, a very unstable and unpleasant feeling I can assure you.
So the moral of the story if your frame is already small for you, like when people get a 16 instead of an 18, a longer stem might be necessary to give suitable reach. If the riding position is already stretched i.e. the frame/stem combo is a bit too big for you (common with older XC bikes with 100-110 stems), you will be able to get away with a shorter stem. As said try 60-70 mm, it seems to be the sweet spot on a lot of older XC geo frames that are not already on the small side.
Obviously the shorter the stem the wider the bar needs to be to keep a similar steering speed. Good luck 🙂