Gender is actually the societal presentation of the sexes- the stuff associated with a particular sex. For example, short skirts are considered feminine (associated with the female sex) in most of the modern West, but they don’t impede movement are easy to make so they were worn in battle and considered masculine in most of the ancient world. Even colors- in the early 20th century blue and pink were oppositely gendered. Pink was seen as closer to red and thus more aggressive, so it was for boys, and blue was seen as soothing and less aggressive, so it was for girls. Definitely not how we see it today. Boys were still boys and girls were still girls, just cultural associations differed which is why it is actually accurate to say sex is different than gender.