Matthew 7:1—Judge not, that you be not judged.
As the context reveals, this does not prohibit all types of judging (v. 7:16—you will know them by their fruits).
There is a righteous kind of judgment we are supposed to exercise with careful discernment (John 7:24—Do not judge according to appearance, but judge with righteous judgment).
Censorious, hypocritical, self-righteous, or other kinds of unfair judgments are forbidden; but in order to fulfill the commandments that follow, it is necessary to discern dogs and swine (v. 7:6— Do not give what is holy to the dogs; nor cast your pearls before swine, lest they trample them under their feet, and turn and tear you in pieces) from one’s own brethren (v. 7:3-5—And why do you look at the speck in your brother’s eye, but do not consider the plank in your own eye? Or how can you say to your brother, ‘Let me remove the speck from your eye’; and look, a plank is in your own eye? Hypocrite! First remove the plank from your own eye, and then you will see to remove the speck from your brother’s eye).
— John MacArthur