However, that's nearly impossible to get exactly right, and I've seen lots and lots of ham-fisted mechanics who were supposed to be professionals install bearings wrong such that there's a ton of sideways pressure between the inner races.
This is bad, because it wears the races and bearings fast, and adds resistance (which makes heat) to the bearings.
You should be able to easily turn the bearings with your fingers.
The right way to install bearings is to fully seat one bearing with a driver (I use a socket) that only touches the outer race, or that is completely flat and really really stiff so it touches the inner and outer races equally without extra pressure on the inner race.
Then install the spacer, then install the other bearing, but this time drive it with a threaded rod and drivers that touch both bearings completely and don't put more pressure on the inner or outer race. You want to pull the second bearing in until the inner races bottom on the spacer.
Because you're pushing on all four races equally, the outer race of the second bearing will stop moving before it bottoms in the rim, right when there's zero slop or preload on the inner races.
Alternatively, if you don't have something that can press equally on the inner and outer races, use the same outer-race-only driver you used on the first side, but be super duper careful to stop as soon as the spacer stops having any freeplay. Literally check with each whack of the hammer, and don't whack very hard.
Here's an example from a GS450 manual, nearly every other bike is essentially the same. Check your service manual to see if you should install the left or right side first.
Note the gap between the right side bearing (bottom on right picture) and the hub, but zero gap between the inner races and the spacer.