Leviticus 18:5
3 You must not do as they do in the land of Egypt where you have been living, and you must not do as they do in the land of Canaan into which I am about to bring you; you must not walk in their statutes. 4 You must observe my regulations, and you must be sure to walk in my statutes. I am the Lord your God. 5 So you must keep my statutes and my regulations; anyone who does so will live by keeping them. I am the Lord. 6 “‘No man is to approach any close relative to have sexual relations with her. I am the Lord. 7 You must not expose your father’s nakedness by having sexual relations with your mother. She is your mother; you must not have sexual relations with her.
Ezekiel 20:11
9 I acted for the sake of my reputation, so that I would not be profaned before the nations among whom they lived, before whom I revealed myself by bringing them out of the land of Egypt. 10 “‘So I brought them out of the land of Egypt and led them to the wilderness. 11 I gave them my statutes and revealed my regulations to them. The one who carries them out will live by them! 12 I also gave them my Sabbaths as a reminder of our relationship, so that they would know that I, the Lord, sanctify them. 13 But the house of Israel rebelled against me in the wilderness; they did not follow my statutes and they rejected my regulations (the one who obeys them will live by them), and they utterly desecrated my Sabbaths. So I decided to pour out my rage on them in the wilderness and destroy them.
Notes and References
"... In verse 5 “keeping” is applied to both laws and decrees. These decrees are to be practiced continually so that they may be ingrained into a person’s way of living, their walk. The keeping of God’s commandments bears the promise of life (compare 26:3–13; Deuteronomy 28:1–14; also see references to this verse in Ezekiel 20:11, 13, 21; Nehemiah 9:29). Since humankind disobeyed God in the Garden of Eden (Genesis 3), they have been denied access to the tree of life. God has opened a way to life through obedience to the law. What is meant by life here? The text is imprecise. Placed in the context of the parenesis (verses 24–30), it means that Israel will have a secure, healthy life with sufficient goods in the promised land as God’s people. Later interpreters (as Targum Pseudo-Jonathan and Targum Onkelos and early Jewish commentators like Ramban) have taken “life” to mean eternal life ..."
Hartley, John E. Word Biblical Commentary: Leviticus (pp. 672-673) Zondervan Academic, 2018