Ok, so this what I found.
In general terms, "sex" refers to the biological differences between males and females, such as the genitalia and genetic differences. "Gender" is more difficult to define, but it can refer to the role of a male or female in society, known as a gender role, or an individual's concept of themselves, or gender identity.
This is getting way to complicated. Just to be clear I was mostly talking about sex.
It is a slippery slope. We had a case here in Canada where dude found a loophole to reduce his car insurance by declaring that he is a she. As a female driver he was considered lesser risk and got his yearly insurance reduced by few hundred bucks. Yet even he claims that by all definitions he is a male and identifies as male and claimed to be a female just for monetary gain. Tell me how is this not messed up?
https://www.cbc.ca/news/canada/calgary/change-gender-identification-insurance-alberta-1.4754416