Apparently, on week 17 of gestation: "The fetus still has thin skin, but will start to put on fat. Its skin is covered with a whitish coating called vernix. This “cheesy” substance is thought to protect fetal skin from long-term exposure to amniotic fluid"
Source: https://my.clevelandclinic.org/health/articles/7247-fetal-development-stages-of-growth