Maybe this will help. The law was given for the purpose of bringing us to Christ. Now it would be to our advantage to obey what God tells us to do after we’re saved. So that we aren’t chastened of the lord. But obedience to the law hasn’t anything to do with salvation. (Romans 3:28)