Headset, stem and steerer tube gap?
You are fine and your understanding is correct. It's the total stack height of the spacers and the stem between the top of the headset and the cap that matters, so spacers can be swapped from below the stem to above and vice versa to adjust your stem height as you like it.