The freehub body has a set of splines that allow the bike cassette to grip and turn the freehub. The cassette slides on to these and is held in place by a lock-ring.
Look at the pattern of the splines on the freehub. One is narrower than all the rest.
Bike Cassette Pattern
Look at the matching pattern on the back of the largest cog.
Line Up, Slide On
Line up the patterns and slide the bike cassette onto the hub. If the cassette is new you can slide it directly off the plastic packaging onto the hub. If it’s been used before, or is already loose, you may have to line up each piece in turn. Take care to keep any spacers in the right order. The cogs go on in order of decreasing size.
Screw the threads on the outside of the lock-ring clockwise into the freehub body.
Screw the quick-release nut onto the skewer to secure the tool
Unscrew nut, remove tool, replace conical spring and replace nut.