Too much movement in the stem
Please take your bike to a competent bike mechanic.
We can explain how to properly adjust and maintain a threadless headset. We can also give you hints on how it has to be assembled. However, that you are asking this question shows that you are not at a point where you can fix it so that someone can ride confidently. If the steering, headset, or stem fail a terrible crash is likely to happen.

Assembly
Your bigger appears to have a threadless headset. A headset is the set of bearings that holds the fork in place and allows smooth turning. Since it has to take side loads, forces perpendicular to its plane of rotation, It consists of two angular contact bearings. These need to be pre-loaded.
There is a conical ring with a 45 degree face on the fork crown. The lower cartridge bearing is slid onto the steerer onto it. It should fit closely. The bearing then fits into a cup pressed into the head tube or the head tube directly.
The upper bearing is always rotate by 180 degrees to the lower bearing, so that the angled races take forces along the steering axis opposite to the lower bearings. It slides over the steerer and sits in the head tube, either directly or in a cup. Make sure the 45 degree face of the bearing fits the angled face in its seat.
Next comes a split conical ring. It slides on the steerer and sits on the inside angled face of the bearing. This ring has to be pressed down by the rest of the assembly to pre-load the bearing.
The pre-load is applied through a conical cap, spacers, the stem, (another spacer), the top cap (parts in parentheses are optional).
Most likely there are a number of plastic or rubber rings to seal the bearing assembly.
Adjusting
While adjusting the headset the stem has to be lose. Just close the screws enough so it sits properly on the steerer but can be turned easily.
Tighten the top cap screw. This presses onto the conical ring in the upper bearing via stem and spacers. Here one needs a bit of experience for the correct pre-load. It has to be tight enough to take out any play of the system, and then a little more force. But too much and the bearings will not move smoothly. WIth excessive force the bearings, or their seats will get permanently damaged.
When the top cap is tensioned to the right strain, close the stem bolts. Even when you remove the top cap now, the bearings will keep pre-loaded. It is important that the stem clamp takes all the loads while riding. The top cap is not strong enough and will fail.
Again, get a bike mechanic to fix it. If you botch it, at best you get a bike that doesn't steer, at worst you get a bike that sends its rider to a tumble that breaks their neck.