Romans 7:11-13 — For sin, taking occasion by the commandment, deceived me, and by it slew me.
Wherefore the law is holy, and the commandment holy, and just, and good.
Was then that which is good made death unto me? God forbid. But sin, that it might appear sin, working death in me by that which is good; that sin by the commandment might become exceeding sinful.
Satan deceived Eve. And the LORD God said unto the woman, What is this that thou hast done? And the woman said, The serpent beguiled me, and I did eat (Genesis 3:13). And Adam was not deceived, but the woman being deceived was in the transgression (1 Timothy 2:14). Here, sin deceives Paul.
law is holy — It contains the nature and character of God and brings life with total obedience (which nobody can achieve).
commandment — law in detail
holy, just and good (beneficial) — character of the lawgiver, God
The purpose of the law was to show the heinous character of sin.
What sin worked was God's purpose through the law, demonstrating the true nature and effects of sin.