Cotton is resilient and, with the proper care, will stay beautiful for years.
Always store your garments flat, rather than on hangers, to keep their shape. Hand wash, or wash on a gentle machine cycle, using a suitable detergent and a laundry bag. Never wring or rub.
Reshape while damp and allow to dry flat. Once dry, a steam iron can be hovered over the piece, or it can be ironed very lightly. Don’t press: it will flatten the structure of the knitted fabric.
If you wear your garment often you may, as with all natural fibres, see a bit of pilling. This affects only the surface: carefully remove the little bobbles with a fabric shaver or even a new disposable razor, and your garment will be as good as new.