If I do a lot of mountaineering, a part of my core identity (the way I describe myself) would be to say I am a mountaineer. As a woman, and mother, keeper of pets, I would consider those things a core to my view of myself (my identity, who I am). If asked to say who I am, I would say, I am an animal lover, woman, mother, and so on. The (psychiatric) problem comes when you start saying things like, je suits Napoleon as above
i! Or something equally preposterous, and clearly not. That is considered a symptom of a medically diagnosable psychiatric condition.
Gender is the 'type' of role you associate with. [Previously] stereotypical female gender would be she likes pink and does the 'pink' jobs round the house; he likes blue and does the blue jobs round the house. Which we now know is bollocks, don't we?
Currently some men are conflating this with insisting they can 'self-ID' as a woman, despite being a man, and wanting recognition in law, and access to those spaces specifically protected for women and children, places like women's toilets and female changing areas, where women and children would not feel safe being naked amongst men, or naked men.