How to care for a beanie
A beanie is the piece people wear most and wash least. A few minutes of care keeps it soft for years.
Washing
Cold water, by hand if you can, and no softener: it flattens the knit. Squeeze, do not wring.

Drying
Flat, on a towel, away from the heater. Hanging it stretches the brim, and the heater shrinks it unevenly.
That is all. No special products, no rules beyond those two.