Is this head band machine knit

I tried to knit but my stockinette looks “handmade” compared to this one which looks like it was knit by a machine.

Yes, it’s definitely machine knit with very thin yarn and very small ‘needles’. If you want to replicate it, you’d need laceweight yarn and maybe size 1 or 2 needles, with a lot of stitches. You could use sock yarn and size 3 or 4 and remember knitting looks better after it’s washed to even out the sts.