Not sure if you mean steerer tube length (bar height) or stem length so I'll do both.
I think that depends on a lot of factors so the reasons I have mine one way may not work for you but on my fat bike, it's as long as it came with the stem basically at the top and on my other bike I also have them raised up a bit with a direct mount spacer. I've found I prefer the bars a bit higher both when riding standing up and sitting down. Not crazy riser bar high but higher than would be normal for trail use.
I have a couple of reasons, first I think the idea of a low stance with bent elbows and hinged hips and all that stuff yes in certain cases has advantages for control and is fine if you're racing but it's just not comfortable for a long ride. And with an ebike I end up spending a lot more time or all the time riding standing instead of sit and pedal up a hill then coast down as you would on a mountain bike so you have to balance comfort over duration with maximum control.
I also think a lot of the reasoning for low bars are honestly stupid, things like low bars put more weight on the front tire for grip which while technically true might as well be a rounding error as you can't really add more than a tiny amount of extra weight on the front tire before there is too much pressure on your hands and it's uncomfortable, like those two weights are equal, they have to be. You want to change wheel weight balance you have to do it with geometry or in the case of an ebike, motor and battery mass with both my bikes have more than normal front wheel weight (although still in an ideal range) just because of the added battery and motor mass.
And lastly the fatbike frame is maybe very so slightly longer than I would like so the taller steerer does bring the bars back a little which makes the seated position more comfortable.
And spacers are cheap so you might as well just try it at different heights and cut it after you've decided you like it.
As for stem length this just depends on the bike frame, on my fat bike it's as short as is possible without cheating because the bike frame is long relation to my height. My other bikes are similarly short, one bike is probably too short but I don't ride it much anymore so haven't changed it.