From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
Only God can answer the question about the good, because he is the Good. But God has already given an answer to this question: he did so by creating man and ordering him with wisdom and love to his final end, through the law which is inscribed in his heart (cf. Rom 2:15), the “natural law”. The latter “is nothing other than the light of understanding infused in us by God, whereby we understand what must be done and what must be avoided. God gave this light and this law to man at creation”.19 He also did so in the history of Israel, particularly in the “ten words”, the commandments of Sinai, whereby he brought into existence the people of the Covenant (cf. Ex 24) and called them to be his “own possession among all peoples”, “a holy nation” (Ex 19:5-6), which would radiate his holiness to all peoples (cf. Wis 18:4; Ez 20:41). The gift of the Decalogue was a promise and sign of the New Covenant, in which the law would be written in a new and definitive way upon the human heart (cf. Jer 31:31-34), replacing the law of sin which had disfigured that heart (cf. Jer 17:1). In those days, “a new heart” would be given, for in it would dwell “a new spirit”, the Spirit of God (cf. Ez 36:24-28).20
Consequently, after making the important clarification: “There is only one who is good”, Jesus tells the young man: “If you wish to enter into life, keep the commandments” (Mt 19:17). In this way, a close connection is made between eternal life and obedience to God’s commandments: God’s commandments show man the path of life and they lead to it. From the very lips of Jesus, the new Moses, man is once again given the commandments of the Decalogue. Jesus himself definitively confirms them and proposes them to us as the way and condition of salvation. The commandments are linked to a promise. In the Old Covenant the object of the promise was the possession of a land where the people would be able to live in freedom and in accordance with righteousness (cf. Dt 6:20-25). In the New Covenant the object of the promise is the “Kingdom of Heaven”, as Jesus declares at the beginning of the “Sermon on the Mount” — a sermon which contains the fullest and most complete formulation of the New Law (cf. Mt 5-7), clearly linked to the Decalogue entrusted by God to Moses on Mount Sinai. This same reality of the Kingdom is referred to in the expression “eternal life”, which is a participation in the very life of God. It is attained in its perfection only after death, but in faith it is even now a light of truth, a source of meaning for life, an inchoate share in the full following of Christ. Indeed, Jesus says to his disciples after speaking to the rich young man: “Every one who has left houses or brothers or sisters or father or mother or children or lands, for my name’s sake, will receive a hundredfold and inherit eternal life” (Mt 19:29).
19 Saint Thomas Aquinas, In Duo Præcepta Caritatis et in Cecem Legis Præcepta. Prologus: Opuscula Theologica, II, No. 1129, Ed. Taurinen (1954), 245; cf. Summa Theologiæ, I-II, q. 91, a. 2; Catechism of the Catholic Church, No. 1955.
20 Cf. Saint Maximus the Confessor, Quæstiones ad Thalassium, Q. 64: Patrologia Græca 90, 723-728.
— Veritatis Splendor 12