Gender is a social construct. It is an idea that people of a certain ‘sex’ should behave, dress and act in a certain way. These are called gender roles. It’s important to remember that sex is non binary and gender is a spectrum.
Sources:
https://genderspectrum.org/articles/understanding-gender