Its a simple but can be frustrating thing to do
1. Loosen the bolt holding the stem cap on- just a bit.
2. Loosen the one or two bolts holding the stem to the fork- just enough so the stem with a bit of effort will turn w/ out moving the wheel.
3. Tighten the Stem cap bolt just a bit
4. Make sure wheel and handlebars are aligned at 90 angle, Hold front brake and gently rock the bike forwards and backwards to determine play.
5. Repeat 3 and 4 as needed
6. Once its not rocking tighten stem bolts.
Dont crank down on step 3 or it gets hard to turn, there is a sweet spot.