Here David compares how Yahweh cares for his people to how a shepherd cares for his sheep. Possible meanings are 1) "makes the number of people in their families increase like flocks" or 2) "takes care of them like a shepherd cares for his sheep" (See: [[rc://en/ta/man/translate/figs-simile]])