When we are criticising or judging others, it is not others that we judge, it is our own behaviour, our own internal struggle.
If we focus on our own interior world and not on the exterior one, then life becomes much more peaceful and our relationships with others become peaceful too.