I sort mine by species, mainly. Species groups are grouped together in categories based on taxonomy, so I have all the caniforms together, all the feliforms, rodents... etc. Some groups have a couple closely related species in it if the group would be too small or unlikely to ever get any more pets in it, like Okapi and Giraffe*, or if they would be hard to tell apart, like lions, tigers, leopards, and jaguar are all together, since they use the same lineart, and the only difference is how they are colored. (and there is a Tiger x Lion litter too...) So that group is essentially all the animals that are under "panthera" taxonomically. I keep the Otters, Ferrets, and Martens together since they are all mustelids, and it also reduces the number of groups. But, I have to keep a group that has just red panda in it, and one that has just skunks, because theres nothing else related enough to put together with them, even though they only have 2 pets in each of those groups.
When it comes to determining what species something is, I do not look at what lineart it is "based on", I mostly just look at what I think the animal would be called objectively, by someone who didn't know the CS linearts and what they are.
So these are both skunks, even though we know one is based on the dog lines and the other is based on the bunny lines, no one else would look at these and call them a dog or a bunny.


A pet like this, however, is just frustratingly enough in the middle that I have internal debates over what it is:

Ultimately, this is an edited fox to me so it goes in the fox group, because while it has a lot of antelope(?) traits, i would not look at it and say that it
is an antelope, because it has a fox face, body, and paws.
I also have a bunch of groups that fall into the catagory "fantasy and prehistory", which is like butterfly wolves, dragons, unicorns, and so on. the prehistory stuff is from the cave event mainly, divided into time period because i was Not about to get into prehistoric taxonomy. It also leaves a group of 50 pets that are in the fantasy "Other" group like hamster gnomes, krampus, cyclops, toucan deer... all the crazy stuff that has been released over the years.
I do have a lot of "special" groups as well like staff litter group, favorites, hoards, and cosplay groups.
My trade groups are organized only by year, except for everything that is rare+ is in a rare trade group. I used to organize these by species as well, but as determined by the 'lines'/archive catagory, but it made it very difficult to trade so i do not reccomend it. If i was asking someone for a 2015 dog for example, i'd want to offer them something else from 2015, but then i'd have to go page after page in my dog group until i found 2015. Organizing by year is much more effective, I go to the 2015 group, and there are plenty of dogs mixed in throughout the group to pick from.
*
of course 26 minutes after I posted this they released a new giraffe