To replace the headset, first loosen the lower handlebar clamp (23).
Remove the two screws (24).
Next, pull the handlebar upwards. Now loosen the two nuts (26 and 27) against each other until both are free.
Then unscrew both from the fork's handlebar thread one after the other (right at the bottom of the image).
Now, pull the fork out downward. You will get the following parts (from top to bottom): Ball bearing with cage (29), bearing shell (28), fork mount (30), bearing shell (28), ball bearing with cage (29), and fork with cone (36).
Now you can replace the bearings. The cone and bearing shells do not necessarily need to be replaced unless they show excessive wear.
For reassembly, simply follow the steps in reverse order. When assembling parts 26 and 27, ensure that there is enough free movement of the handlebar in the turning direction. Then tighten both nuts against each other.
To align the handlebar, slightly loosen screws 24 so that you can turn the handlebar against the wheel.
Adjust your straight-line alignment and tighten the two screws again.