yeah, that game is practially what native speakers of many languages do every day unconsiously and learners of that language curse about when learning it. and it gets worse if your look at other languages or even your own for some words.
french and german. la luna, der mond. (female) the moon, (male) the moon.
oh and there are some languages that use two and some that use three genders for nouns. and it is not about any attributes that will tell the gender. it is just the base form of the noun. it includes the article. like you would call "to talk" as the base form of the verb talking. german "die frau" is base form of (the) woman and the article carries the case of the noun. so you will encounter "der frau" as well. (der is male article, but also a flexed version of die). "die tasche der frau" is the bag of the woman or better that woman's bag.
grammatical gender is just that. grammar. it is a way of delivering the information about the case the noun has. english does not use an infleced case system. in german you need those, since you can order words around in a sentence without changing meaning. you usually cannot do that in english.
and because it is just grammar, you can also have words for persons that have a non grammatical gender and that word will not have the same gender as that person. it is just the grammatical gender of the word
fun fact, while speaking, if you accidentally used the wrong article you sometimes can save it during speech, by switching to a synonym for the word, that has the matching gender.
I had no idea about a girl being a neutral gender in German
it sometimes is called neutral or neuter, but also it can be called literally "used for things" or "thing-like". it is not male,female, neutral. it is male-ish, female-ish, thing-ish.
so you cannot simply use "it" for nonbinary people in german. it would be an insult.
there are some neutral nouns for persons which just shows that grammar gender is just grammar. das genie for example. the genius. and of course das kind. the child. or das mädchen. the girl. das baby. the baby.
so if you refer to a person by a noun that has neuter gender, it is not an insult, if you use the "it" pronoun. which gets complicated, if there are several nouns with different genders you can use and did use in a longer text. trival example is a kid and it's name. (which would be a kid and his name in formal english. there are remnants of grammar gender in english after all). so if you talk about a kid named angela (a female name), but also refer to her as a kid you would refer to her as "it", till you introduce her name in the text.
and if you are not confused enough, some words have more than one correct gender. it depens on dialect or meaning. butter is encountered as female and male. ketchup as neuter and male.