This is
CCC 2415-18. I found it in a few minutes’ Internet search. It’s a good idea to look up what the Catechism says before saying "I heard that it says. . . . " The Catechism is not hard to look up.
Clearly it’s not talking about shelters and things like that. The first sentence of CCC2418 says “it is contrary to human dignity to cause animals to suffer or die needlessly.” Obviously establishing shelters so that they won’t suffer or die needlessly is encouraged, not discouraged. It’s a question of proportion. Some people treat their pets as extensions of their own egos and spend loads of money on them while not caring about human suffering. That’s presumably what the CCC is talking about. Similarly with the “affection due to persons.” It says explicitly that we
are to love animals.
Again, looking up the whole passage is a good idea!
Edwin