It’s a traditional Scandinavian ‘Djævlehue’ in garter stitch with increases/decreases.
Yarn & gauge is not important.
Try out this pattern - if the hat fits a preemie, donate it to charity.
If it fits a larger baby, give it to a newborn in your neighbourhood.
Traditionally this hat is knit flat and then seamed. After seaming the cast on and cast off edges together, the bottom zig-zag edges on the picture above are seamed together to form the hat.
I suggest suggest you join the seams together as you knit – a bit like doing short rows.