Suggestions for Writing Female Characters In Fanfic
Women are individuals. There are women of every personality trait that can be named, every talent or lack thereof, every culture, every dimension of every ethical system, every attitude toward politics, every attitude toward preferred language or trigger warnings. The set of all women is diverse, as the set of all men is diverse. There is no law against writing any kind of female character, only guidelines on how to do it better.
Avoid misogynistic stereotypes. Real people are three-dimensional, fictional characters aren't really although may seem so to the reader. Real people aren't really stereotypes no matter what they do, fictional characters set up as stereotypes can be hurtful. Some common negative female stereotypes are gold-digger, slut, bitch, whore, welfare queen (also racist), prude, dumb bimbo, dumb mother. (Note that some of these are mutually exclusive.) An extra-special fandom one is the homophobic woman who can't bear the thought of a male character she truly cares about in canon falling in love with another man. First, think about if the character's behaviour is genuinely destructive: consensual sex is not evil, so you shouldn't shame women by calling them sluts. Neither is believing that one's canon love interest has feelings for one and are cheating if they run off with someone else, male or female. Second, more than one dimension is good--real women can do evil things in real life and fictional women can be the same, but a one-dimensional caricature can feel misogynistic especially if the character isn't like that in canon.
Steering out of avoidance into affirmative suggestions, show more than one. This is more of a canon thing, but when there's only one main female character it's easy to read her as how the writer thinks of women in general. When there's only one main female character despite an in-setting population demographic that would suggest a greater female-male ratio, it's easy to read this as the writer wanting to exclude women. There's nothing wrong with women who wear skirts and are badass at knitting, nothing wrong with women who wear trousers and are badass at swordfighting, and nothing wrong with women who are badass at all the above. That way, if one female character shows weakness or another female character is downright evil or the swordfighting female character is immature and contemptuous of the knitting female character, the reader gets to see that you're treating a set of different female characters as different people--and that's pretty representative of the real world. Readers tend to enjoy convincing female characters even if it's a fantasy world where knitting tournaments determine the next lady dragon ruler of the land.
And along with showing more than one comes how stereotypes are probably okay if they're humourous or id-fantasies. It's perhaps even more of a YMMV point than the others, but if the one-dimensional female character is having fun or is balanced out by other one-dimensional characters or is more a power fantasy of conquering the world than a depowering fantasy of breaking a Bad Woman character, then this can be okay too. These aren't rules, they're guidelines with exceptions.
Flesh them out. Canon doesn't always do a good or consistent job of writing female characters, but fanfics that repeat the misogyny or increase it aren't improving on the source material. More of a flat sexist stereotype, and/or what's called 'bashing' in fandom, generally doesn't help. Pick an approach, reconcile or dump inconsistencies at will, think about the world from their point of view, and make them interesting. Just as one might do for any character.
On the opposite note, trying to write any character in character is typical fanfic advice. Take a female character's canon relationships into account. Remember their canon skills and abilities. Character development is good, especially if it keeps them capable and competent.
If you want to change a female character to make her break up with her canon love interest or to turn down a negative ethical path or to turn a new leaf into becoming more ethical, take the time to write it out. Real people change, so convince the reader that the fictional character has changed in an in-character way. People break up for all sorts of reasons and if neither party is abusive, then the blame is likely to be on more than one side. If she turns to the bad, her friends should probably be concerned for her and her good traits won't vanish in just one night; don't reduce her to a caricature. If she turns good, don't make it be solely for love of a male character (or female character for that matter)--changing for the sake of love alone is one of those tropes that doesn't tend to be very psychologically plausible, and subordinating a female character to a male character's storyline can be read as poor treatment. Characters can change for better or worse, growing stronger or becoming weaker; write this for a female character just as one would write it for a male character--convincingly.
Don't victimise a female character for the sake of a male character's plot. This relates to Women In Refrigerators: a woman who suffers a horrific ordeal purely as a motivation for a male character (or a reason for him to comfort and romance her). Real people can be victimised and that has an impact on the people around them, but taking a female character's pain and making it all about the male observer is misogynistic. Don't make a female character behave out of character in order to make her a victim. Don't blame victims for another character's choice to harm them. Don't have a female character recover from assault through a male character's bedroom skills and/or healing cock. If you kill off a female character, have other characters respond as one would expect to her death--don't have them throw a party if in canon they would be more likely to grieve. Do the research and keep everyone in character.
Female characters can (or not) deal with sexism. Male characters and female characters and characters of all gender identifications can be sexist. This is a trait that real people have and it's okay to write about. Sometimes not-so-bright readers can mistake a writer's Lord Voldemorts for encouraging impressionable young minds to practise the devil's witchcraft; sometimes writers can include misogyny that seems to be supported by the writing, especially if it's out of character in the original source material. Not all Earth cultures have identical views on gender and fantasy worlds definitely don't. Sometimes female readers want female characters who smash patriarchy, sometimes female readers want female characters who cope with sexism, sometimes female readers want female characters who ride dragons or spaceships and have never had to deal with sexism ever, sometimes these are even the same female readers. If you write characters who are sexist against female characters, think about the effect it has on other characters and use that as the story demands.
Female characters aren't limited. Female characters can go on quests and have adventures. Female characters can fall in love or learn to hate. Female characters can have experiences specific to their gender and have experiences common to all people. Female characters can go on a Hero's Journey. Female characters can find themselves to be a villain in the end. Female characters can ride past the white wild mists to the door beyond and ring three times on the bell. Female characters can be direly wounded or die heroically--or miserably. Female characters can take up the long copper spear from the lake and ride out in defence of family and home. Female characters can pelt people with ripe dates and knit quirky woollen hats. Write female characters doing whatever you like the most to write, because you can.
How to write female characters in two seconds flat is, Just Like All Characters, Think And Do The Research. Really, why do people ask for guides on how to write female characters when in real life you can generally find a real female person or two to observe by walking out of one's door, if one isn't already female?