Hi and welcome!
You really need to make a gauge swatch to find out how many stitches to cast on and with which size needle. Usually the pattern will tell you how many stitches you should have over 4inches of knitting. Cast on 4-6 more stitches and knit for about 4 inches worth and then measure the number of sts over the center 4 inches. If you have more sts than the pattern gauge calls for, use a larger needle; if too few sts, use a smaller size needle. That's the best way to determine which needle to use and how to make a hat that'll fit.
If this is the pattern
, it doesn't give a guage. Still, cast on about 24sts and knit in k2p2 rib to see how many sts you get over 4 inches when slightly stretched. Then you can figure out if you need to change the needle or the number of cast on sts.