So I’ll just point out a few cases of hairstyles changing over time and culture, as this isn’t a case of before/after, but rather something that fluctuates based on era and geography.
When the Normans invaded England, their popular hairstyle was a clean shaven look, with the back of the head shaved as well, and the top and front being closely cropped. You can see this style on the Bayeux tapestry, and it was given a modern approximation on the TV show Vikings (see young Bjorn’s haircuts in seasons 1-2). But kids have always liked to rebel, so the children of the Norman invaders adopted the hairstyles of the Anglo-Saxons their fathers had conquered - notably very long tresses and long mustaches.
When the Vikings first arrived in Ireland, one of the local Irish monks’ complaints concerned the Vikings long hair - apparently the local women found the look more attractive than the shorter cuts that Irish men sported.
In early descriptions of the Native Americans of what is now the American Northeast, it seems it was quite common for the men to be the ones with highly decorative hair styles. A common one was to shave the side you drew your bow on, and to let the other side grow very long, which would then be braided or decorated in other ways. Some tribes would shave and feather alternating sections of the head, like having three different “Mohawks” to use the modern description.
So what era and culture were you wondering about? Because short hair on women was popular in the US during the 1920’s, but 60 years later big/long hair was all the rage. High heels are almost exclusively seen as being for women in western culture, but they were introduced in France originally as a men’s fashion. There’s just no clear before/after in the global timeline when it comes to fashion.
In case there's not an answer, you may consider also posting this to /r/AskAnthropology as the practice might be prehistoric.
So alongside cultural trends, sex hormones do play a role when it comes to hair texture and condition, with estrogen making hair fuller and softer (hence pregnancy often making hair look great, and mothers experiencing hair loss after birth). So while that doesn't necessarily mean cis women's hair grows longer naturally, it does make hair lend itself to being longer. Testosterone also raises the hairline, and people tend to keep hair short with a higher hairline (though we know this hasn't always been the case, eg early medieval European trends for big foreheads in women). Taking cross-sex hormones (eg in transgender people) will cause these changes even well after puberty - the only thing that won't change is the hairline for people taking estrogen, as it cannot override the hairline rising due to testosterone.