Deuteronomy 6:18

18 Do what is right; do what is good in God's sight so you'll live a good life and be able to march in and take this pleasant land that God so solemnly promised through your ancestors,

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 Don't push God, your God, to the wall as you did that day at Massah, the Testing-Place.
17 Carefully keep the commands of God, your God, all the requirements and regulations he gave you.
18 Do what is right; do what is good in God's sight so you'll live a good life and be able to march in and take this pleasant land that God so solemnly promised through your ancestors,
19 throwing out your enemies left and right - exactly as God said.
20 The next time your child asks you, "What do these requirements and regulations and rules that God, our God, has commanded mean?"