"Whatever is not from trust is sin" (Romans 14:23). "The law is not from trust" (Galatians 3:12). "Is the law sin? Certainly not!" (Romans 7:7)
Most take Romans 14:23 to mean, "Whatever is not from trust is counted as a sin" but it actually is saying "whatever is not FROM trust is FROM sin." A person cannot operate by trust & by law at the same time. Galatians 3:12 is saying, "Obedience to the law does not come from trust in Christ because Christ has freed you from the law & He will not put you under it." The law itself is not sin & the law does not come from sin but from God. However obedience to the law is not based on trust thus sin is who convinces a person to keep the law.
From sin's point of view "Rules are made to be broken." From God's point of view "Rules were made to show you that you are broken." Trust in Christ fixes you permanently. Sin seeks to make you feel broken by convincing you to put yourself under the law. Under the law sin uses the law to produce evil desires in your flesh.
The law came from God. You cannot adhere to the law & trust in Christ because He has ended the law & you have been released from it. If you feel as though you must keep the law it is not Christ giving you that feeling but sin itself seeking to deceive you & produce evil desires in your flesh that will hurt you.