God looks at our hearts. He looks at the motivation for our actions. God doesn't look at whether we do or do not obey the law. Law distracts us from Jesus & has us put our focus on sin rather than Jesus. God wants us to live holy, love, & live knowing He is there with us. This is why scripture speaks of "If I have not love, I am nothing" & "faith without works is dead." Showing faith by works flows from love, the condition of one's heart, & who a person is in character. It is not shown by law, legalism, & the intent of working only to prove one's faith.
If I have prophetic powers, and understand all mysteries and all
knowledge, and if I have all faith, so as to remove mountains, but have
not love, I am nothing. -1 Corinthians 13:2
So also faith by itself, if it does not have works, is dead. -James 3:17.