sex is the original term everybody used until the late 90s 2000s. ‘gender’ is a term hijacked from linguistics madeup for entirely political reasons. Its what I call a Jekyll and hyde word where its usually used as a synonym for sex but when you confront a user about it they can retreat to the idea that gender is also about your imagined sex. So its both a synonym and not.
Sex means one has a penis. Gender means one likes other herpes encrusted penises repeatedly jammed into orifices desinged for sewage outflow