Yes, it is true that we must (law) obey God rather than men. Yet, we’re better off disobeying God rather than men because God is a merciful God (grace).
“David said to Gad, “I am in deep distress. Let us fall into the hands of the LORD, for his mercy is great; but do not let me fall into human hands.”” (2 Samuel 24:14)
“For God has bound everyone over to disobedience so that he may have mercy on them all” (Romans 11:32)
“to the one who does not work but trusts God who justifies the ungodly, their faith is credited as righteousness” (Romans 4:5)
“You see, at just the right time, when we were still powerless, Christ died for the ungodly.” (Romans 5:6)
The strength to obeying God is called grace, not fear of punishment, but joy of deliverance from fear of punishment, the joy of our salvation by God through Christ by His Spirit.