Most of the Bible is a textbook instructing Christians how to judge others.
But this is the pope. My Catholic friends tell me the Bible isn’t important in relation to what a fallible man in an unfashionable hat decrees. So if you’ve got that going for you, i.e., blind obedience by church members, you can say/do anything. It’s good to be pope.
Interestingly, one of the few passages in the NT that teaches us how and who to judge is ignored:
1 Cor 5 9 I wrote to you in my letter not to associate with sexually immoral people 10not at all meaning the sexually immoral of this world, or the greedy and swindlers, or idolaters, since then you would need to go out of the world. 11But now I am writing to you not to associate with anyone who bears the name of brother if he is guilty of sexual immorality or greed, or is an idolater, reviler, drunkard, or swindlernot even to eat with such a one. 12For what have I to do with judging outsiders? Is it not those inside the church whom you are to judge? 13God judges those outside. Purge the evil person from among you.