The Old Testament man was compared to a child in his ability to grasp spiritual truth. It is impossible to explain spiritual truth to a young child, and yet, a child must be controlled from submitting to evil. So, the Word of God teaches us to use the "rod of correction" (Proverbs 13:24; 19:18; 22:15). The child may not understand resisting the devil, and yet, when the devil tries to get him to sin, he will say "No!" because he fears he will get the rod if he does. Old Testament saints were controlled from sin by a fear of the wrath and punishment of God. This controlled sin, but it also hindered them from receiving the goodness and love of God (1 John 4:18).
Under the New Testament, the punishment for our sins was laid on Jesus. We don't serve God out of fear of punishment, but we serve Him out of love; because He has sent the Spirit of His Son into our hearts, making us His sons. We serve Him because our nature has been changed through the new birth. We must be taught of God through the indwelling presence of Christ.