Sex has to do with your physical body, while gender has to do with your social expression of a range of masculinities and/or femininities (and/or neutralities).
Chauntelle Tibbals, Exposure: A Sociologist Explores Sex, Society, and Adult Entertainment
gender, sex