Sex

Sex is a group of physical differences in a species based on chromosomes, genitals, hormones, and secondary sex characteristics. Sex is used to determine one's assigned gender at birth (AGAB), though, one's assigned sex at birth does not determine one's gender later in life. Sex is often thought of as only including male and female, but similar to gender, sex is a spectrum with male and female being to extreme points. People can be intersex, which means they do not cleanly fall into "male" or "female".

Gender Identity
Gender is a social construct, and can differ from ones biological sex (transgender), and has values typically associated with it such as masculinity, femininity, androgyny. Gender is a spectrum with many positions or 'identities', such as agender, androgyne, demigirl, and much more.

Resources

 * 1) https://apastyle.apa.org/style-grammar-guidelines/bias-free-language/gender