Matthew 5:20
20 For I say to you, that unless your righteousness exceeds the righteousness of the scribes and Pharisees, you will by no means enter the kingdom of heaven.
Judgment is not forbidden. To be God’s spiritual people, we have to practice righteous judgment. Hypocritical judgment is forbidden.
Matthew 7:1-6
Do Not Judge
1 “Judge not, that you be not judged. 2 For with what judgment you judge, you will be judged; and with the measure you use, it will be measured back to you. 3 And why do you look at the speck in your brother’s eye, but do not consider the plank in your own eye? 4 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? 5 Hypocrite! First remove the plank from your own eye, and then you will see clearly to remove the speck from your brother’s eye.
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.
=>You have to use Judgment in matters. In Matthew 7, Jesus is not forbidding judgment. He is forbidding hypocritical judgment.
Here in 1 Corinthians 5, Paul is practicing righteous judgment:
1 Corinthian 5:1-3 1 It is actually reported that there is sexual immorality among you, and such sexual immorality as is not even named among the Gentiles—that a man has his father’s wife! 2 And you are puffed up, and have not rather mourned, that he who has done this deed might be taken away from among you. 3 For I indeed, as absent in body but present in spirit, have already judged (as though I were present) him who has so done this deed.
1 Corinthians 5:9-13
9 I wrote to you in my epistle not to keep company with sexually immoral people. 10 Yet I certainly did not mean with the sexually immoral people of this world, or with the covetous, or extortioners, or idolaters, since then you would need to go out of the world. 11 But now I have written to you not to keep company with anyone named a brother, who is sexually immoral, or covetous, or an idolater, or a reviler, or a drunkard, or an extortioner—not even to eat with such a person.
12 For what have I to do with judging those also who are outside? Do you not judge those who are inside? 13 But those who are outside God judges. Therefore “put away from yourselves the evil person.”
Galatians 6:1 Brethren, if a man is overtaken in any trespass, you who are spiritual restore such a one in a spirit of gentleness, considering yourself lest you also be tempted.
Judgment is not forbidden. To be God’s spiritual people, we have to practice righteous judgment. Hypocritical judgment is forbidden.
In Romans 10:1, Paul recognizes his own brethren were lost, and is judging them for that:
Romans 10:1-3
1 Brethren, my heart’s desire and prayer to God for Israel is that they may be saved. 2 For I bear them witness that they have a zeal for God, but not according to knowledge. 3 For they being ignorant of God’s righteousness, and seeking to establish their own righteousness, have not submitted to the righteousness of God.
Romans 14:13 – Therefore let us not judge one another anymore, but rather resolve this, not to put a stumbling block or a cause to fall in our brother’s way.
Romans 14:13 is often used to say no one should judge, but Paul does not forbid righteous judgment. You must read the full chapter to understand the actual context. Paul is forbidding OVER critical judgment. To be God’s spiritual people, we have to practice righteous judgment.