Bamidbar / Numbers 31:28 · Sod
וַהֲרֵמֹתָ מֶכֶס לַיהוָה מֵאֵת אַנְשֵׁי הַמִּלְחָמָה הַיֹּצְאִים לַצָּבָא אֶחָד נֶפֶשׁ מֵחֲמֵשׁ הַמֵּאוֹת מִן־הָאָדָם וּמִן־הַבָּקָר וּמִן־הַחֲמֹרִים וּמִן־הַצֹּאן׃
And levy a tribute for the Eternal from the men of war who went out to battle: one soul of five hundred, of the persons, and of the cattle, and of the donkeys, and of the flocks.
Sod סוֹד
The ox and the sheep
Pride and humility can each be good or bad. The tribute is taken from cattle and from flocks, and Shem MiShmuel sees in these two animals two traits of the soul.
Shem MiShmuel: the ox is an image of pride, the sheep an image of humility. Neither trait is praiseworthy unless it is in holiness. Pride in holiness: not to be ashamed of serving the Eternal even when mocked. Humility in holiness: to submit to the Eternal and His Torah, not to bow before the wicked. Therefore offerings to the Eternal come from both animals.
How Shem MiShmuel explain it
Shem MiShmuel Of the cattle and of the flocks
Now it is written: "The ox knows its owner" (Yeshayahu / Isaiah 1:3). And the commentators explained that the ox has knowledge: it recognizes its owner as soon as he acquires it. And perhaps for this reason the king among cattle is the ox. And our sages, of blessed memory, said: there are five kinds of proud ones in the world, the ox among cattle. And the sheep is submission and lowliness: the head of one is at the tail of the other, the opposite of the ox's trait. And there is no praise in either unless they are in holiness. That is, that a person's heart be lifted up in the ways of the Eternal, and he say: "The whole world was created only for my sake", and all who mock him and his service be in his eyes as nothing and emptiness. But outside holiness, pride is a very bad thing. And likewise submission and lowliness in holiness: to be submissive to the Eternal, His Torah and His service. But outside holiness, submission will bring him to bow before the wicked and efface himself before them. And this is why from these two kinds an offering is brought to the Eternal: their whole matter must be only in holiness.
Takeaway
Shem MiShmuel writes this on the words "of the herd and of the flock" at the opening of the book of Vayikra (Vayikra / Leviticus 1:2). The same two kinds are named in the tribute from the spoil of Midyan.
The words "The whole world was created only for my sake" are quoted in the Mishnah (Sanhedrin 4:5).