Hello Ashraful!
"judge by" talks about character traits or observation.
"They judged him by his clothing to be a very rich person."
"Never judge a book by its cover."
"Judging by the peeling paint, I would say that this chair is very old."
"judge on" talks about performance, competition, and contests.
"He entered a public speaking contest, and was judged on his ability to persuade others. He scored a 10 out of 10."
"In the ice carving competition, competitors are judged on their skill and creativity."
In the sentence, "Is gender you judge someone by?", it is "judge by". Hope that helps!