I sort my characters with a combination of all three, mostly species and story/fandom.
Closed species are all given their own folders within my main closed species folder, to keep them organized with other members of their species. Some of them are further divided from there, like Hunter's Woods being split up into official characters within the ARPG (adopts and MYOs) and NPCs (characters not officially part of the ARPG but still within the verse of the other characters), but most of them don't have a need for those distinctions - My Vaikis are probably the ones most in need of additional folders, due to different groups having different stories, but due to them all existing within the same world and some connections between characters within different stories, I've never bothered with it :p How individual characters are sorted within those folders varies, though - Most of them are just default alphabetical, but for my ARPG species, due to the singular overarching plot within each of them that's being developed over time, I customize the order of the characters based on when they joined the group in-universe.
Non-closed species characters, meanwhile, are sorted by story and/or fandom - My purely original characters are all in their own folder, subdivided into folders for specific groups or settings (one of which, the Pantheon, is further divided via flattened folders into "tiers", so to speak. For instance, the deity of life and death is considered a major or greater nature deity, whereas the goddess of the sky is just a normal god of nature, and the deities of weather who serve beneath her are minor or lesser gods of nature; there are also separate sections for the gods of mortals, as well as one for demigods both within and outside of the pantheon itself), save a few characters whose settings I haven't decided on at this time. Fancharacters are sorted similarly, in a general fancharacters folder, divided into folders for specific fandoms, and then, where applicable, further divided into individual stories or verses within that fandom (e.g. Fancharacters -> Pokemon -> Nuzlockes -> Specific Nuzlocke(s)).
Aaaand I also have a couple of other folders: A sonas folder, whose characters function less as your typical sonas and more as important characters of mine (despite what their lack of use may suggest, lol), but are separate enough from any stories/verses that I've just given them their own section; a joke characters folder, where I put characters who were never intended to be taken seriously in the first place; and a hidden folder of characters I've retired but chosen to keep for one reason or another, including a folder specifically for a species which I'm no longer active in.