What does Catholic Church teach about the interpretation of the metaphor of "salt of the earth?" We see Jesus telling at Matthew 5:13 (NRSVCE):

"You are the salt of the earth; but if salt has lost its taste, how can its saltiness be restored? It is no longer good for anything, but is thrown out and trampled under foot."

My question is: what exactly is the significance which Jesus is attributing to the earth with reference to salt . Does he mean that the earth is the source of salt ; or does he mean that salt is really valuable - both as a taste-maker and as a preservative-- for  mankind which dwells on the earth? What do the teachings of Catholic say about the interpretation of the metaphor or "salt of the earth?"
St. Thomas Aquinas's commentary on Matthew 5:13 gives four reasons for why the Apostles can be compared to salt:

The first reason is on account of the production of salt, which comes from both the wind and the sun’s heat: for spiritual generation is from the water of Baptism and the power of the Holy Ghost; “Unless a man be born again of water and the Holy Ghost, he cannot enter into the kingdom of God” (Jn. 3, 5). And the production of salt comes from the heat of the sun, meaning from the fervor of love which is from the Holy Ghost; “The charity of God is poured forth in our hearts, by the Holy Ghost who is given to us” (Rom. 5, 5). Secondly, it is on account of the utilities of salt, of which the first is its use, that all things are seasoned with salt: hence, it signifies the wisdom which apostolic men ought to have; “The wisdom of doctrine is according to her name, and she is not manifest unto many, but with them to whom she is known, she continueth even to the sight of God” (Eccli. 6, 23), and, “Walk with wisdom towards them that are without, redeeming the time” (Col. 4, 5). The second use13 was that in every sacrifice salt was added (Lev. 2, 13),14 because apostolic teaching ought to be reflected in our every deed. The third use is that it absorbs excess moisture and by this preserves from putrefaction. In this way the Apostles were restraining carnal concupiscences by their teaching; “The time past is sufficient to have fulfilled the will of the Gentiles, for them who have walked in riotousness, lusts, excess of wine, revellings, banquetings and unlawful worshipping of idols” (I Pet. 4, 3), and, “Let us walk honestly, as in the day: not in rioting and drunkenness, not in chambering and impurities, not in contention and envy” (Rom. 13, 13). The fourth effect of salt is that it makes the ground sterile. Hence, it is said that some conquerors oversowed salt outside a city which they captured so that nothing would grow. In like manner, also the Gospel teaching makes the ground sterile, namely, so that earthly works do not spring up in us; “And have no fellowship with the unfruitful works of darkness: but rather reprove them” (Eph. 5, 11). Therefore, the Apostles are called salt because they have pungency for withdrawing from sins; “Have salt in you: and have peace among you” (Mk. 9, 49).
But someone could say, ‘It suffices that I have salt.’ But on the contrary, it is necessary that the power of salt keep you from sin, and for this He cites four reasons. The first is taken from its incorrigibility, and hence it is said, But if the salt lose its savor, wherewith shall it be salted? Those things properly lose their savor that lose their strength: just as strong wine sometimes loses its strength, so salt sometimes loses its pungency; “But if the salt become unsavoury, wherewith will you season it?” (Mk. 9, 49). Hence, one then loses his savor when he is guilty of sin; “They became vain in their thoughts. And their foolish heart was darkened” (Rom. 1, 21). If, therefore, on account of tribulations or some other reason you withdraw from virtue, in what shall you be salted, meaning in what other thing will you be salted with salt? For if the people sin they can be corrected, but if a prelate sins, no one can reform him; “How long will they be incapable of being cleansed?” (Os. 8, 5). And it ought to be observed that in Luke 14, 34, it is said: “But if the salt shall become tasteless (infatuatum)”:15 For it is great foolishness (fatuitas) to relinquish eternal things for temporal things.
The second reason is taken from its utility, hence, it is said: It is good for nothing, and He explains this in Luke 14, 35, where it is said: “Neither profitable for the land nor for the dunghill,” because it makes the land sterile and does not fertilize it. So spiritual men, when they sin, are able to do nothing, because they are not able to do secular business as soldiers or men of this kind are able to do; “Son of man, what shall be made of the wood of the vine…? Shall wood be taken of it, to do any work, or shall a pin be made of it for any vessel to hang thereon? Behold it is cast into the fire for fuel… shall it be useful for any work?” (Ez. 15, 2-4), and, “They are all gone aside, they are become unprofitable together” (Ps. 13, 3).
The third reason is taken from the imminent danger, and it has two branches according to two dangers. The first is expulsion, hence: but to be cast out, namely, from the Church; “Without are dogs and sorcerers and unchaste and murderers and servers of idols and every one that loveth and maketh a lie” (Apoc. 22, 15). Likewise, the dignity of priestly teaching is taken away from him; “Because thou hast rejected knowledge, I will reject thee, that thou shalt not do the office of priesthood to me” (Osee 4, 6), and, “Therefore I say to you that the kingdom of God shall be taken from you and shall be given to a nation yielding the fruits thereof” (below 21, 43), and so it is said, but to be cast out. The second danger is being made worthless, because they who firstly live supernaturally and fail, become contemptible, and so it is said: and to be trodden on by men; “This man began to build and was not able to finish” (Lk. 14, 30), and, “You have departed out of the way, and have caused many to stumble at the law: you have made void the covenant of Levi, saith the Lord of hosts. Therefore have I also made you contemptible, and base before all people, as you have not kept my ways” (Mal. 2, 8-9). And it ought to be observed, according to Augustine,16 that if some holy men are made worthless, as it is said above, “And they shall speak all that is evil against you, untruly, for my sake” (5, 11), still they can never be trodden on, because they always have their hearts in heaven, and they are properly trodden on who lie on the earth.