Deuteronomy 6:18

18 and thou hast done that which is right and good in the eyes of Jehovah, so that it is well with thee, and thou hast gone in and possessed the good land which Jehovah hath sworn to thy fathers,

Deuteronomy 6:18 Meaning and Commentary

Deuteronomy 6:18

And thou shalt do that which is right and good in the sight of
the Lord
And what is such appears from the declaration of his mind and will in the commandments he has given, and obeying which is therefore doing what is right and good; for his commandment is holy, just, and good, being agreeable both to his nature and will, ( Romans 7:12 ) that it may be well with thee; as it is with those that fear God, and keep his commandments:

and that thou mayest go in and possess the good land which the Lord
sware unto thy fathers;
to give to them and to their posterity, even the land of Canaan; but if they did not what was right and good in the sight of God, they might expect to be kept out of it, as their immediate parents were, whose carcasses fell in the wilderness.

Deuteronomy 6:18 In-Context

16 `Ye do not try Jehovah your God as ye tried in Massah;
17 ye do diligently keep the commands of Jehovah your God, and His testimonies, and His statutes which He hath commanded thee,
18 and thou hast done that which is right and good in the eyes of Jehovah, so that it is well with thee, and thou hast gone in and possessed the good land which Jehovah hath sworn to thy fathers,
19 to drive away all thine enemies from thy presence, as Jehovah hath spoken.
20 `When thy son asketh thee hereafter, saying, What [are] the testimonies, and the statutes, and the judgments, which Jehovah our God hath commanded you?
Young's Literal Translation is in the public domain.