*Sex refers to a set of biological characteristics found in people and animals. It is most closely related to physical and physiological characteristics like chromosomes, gene expression, hormone level and function, and reproductive/sexual anatomy. Sex is typically classified as either female or male, however there is variety in the biological characteristics that compose sex and how those characteristics are exhibited. It can also be a legal status that we're given at birth or that we change our lives.
Most societies also have expectations and stereotypes about gender based on someone's assigned sex. Like expecting males to be “tough” and females to be “gentle”. These gender expectations can affect a person's social, work and legal rights.
On the other hand;
*Gender refers to the socially constructed roles, behaviors, expressions, and identities of girls, women, boys, men, and persons who are gender diverse. It has an impact on how people view themselves and others, how they act and interact, and how power and resources are distributed in society.
Gender is derived from the Latin term genera, which means ‘kind’ or ‘race.' Gender is defined by one's self identification as male, female, or intersex; however, gender can also be determined by legal status, social interactions, public persona, personal experiences, and psychological context. The gender of a person is a primary state of anatomic or physiological factors. Gender is a broad conclusion reached when individual gender identity and gender role are articulated.
To make it simple ,Sex is the biological construct (sexual organ, hormones, body structure) with which you are born and gender is how society and you feel about yourself that who you really are!!
For example: a person born as a male is male by sex but if he feels to be like a female then the role of gender comes into place.
This is how need for LGBTQ (lesbian, gay, bisexual, transgender, queer) community arise.
They are defined as: