Do not apply sunscreen to a baby younger than six months (source). Until they reach the half-year mark, a baby’s skin is too delicate, sensitive, and permeable for sunscreen to be safe. Instead, the following measures can protect your baby from the sun’s rays:
Keep babies out of direct and indirect sunlight.
Dress your baby in lightweight, loose clothing and cover up as much of their skin as possible.
Ensure your baby wears a sun hat that shades their face and protects their neck from the sun.
For babies older than six months, apply a small amount of sunscreen to any remaining exposed skin 15 to 30 minutes before going outside.