First hat

I’m knitting my first hat and in the instructions it says Change to 4 mm needles and stocking stitch (K all sts). Work straight until hat measures 7 cm ( 8 cm, 9 cm, 10 cm, 12 cm, 14 cm, 16 cm, 18 cm).
I’m working the 18cm can some one explain how to do it thanks

Measure from the row where you started to the row where you are. When that measurement is 18 cm, go on to what the pattern says next.

If it’s “work straight” that’s throwing you off, it means “don’t increase, don’t decrease, just keep working the way you did the last row.” It probably also means to work in stockinette, i.e. knit everything if you’re working in the round so you get a smooth stretch of fabric.