My nan has knitted a lot of stuff and said to wash it just to make it softer for babies skin. X
I'd always wash, depending on where the yarn is from it can contain chemical residue (also if its been made by someone else then best to wash to reduce, smoking pet allergens etc
My aunt in law knitted a baby blanket and said to wash it on cold & lay flat to dry
Hand wash only and flat dry!! If you put in washer it’ll be ruined
My mum who knits has always washed them as she said quite often they can have loose threads and washing often takes the initial harshness of the wool away.