Why do some Christians believe it’s okay to judge others who are saved but not those who aren’t?

I’m seeing other Christians show discernment for people who know the word of God but not for those who don’t know. Doesn’t the bible tell us as followers of Christ to not judge anyone, regardless of their beliefs or salvation?