When the Gentiles sin, they will be destroyed, even though they never had God’s written law. And the Jews, who do have God’s law, will be judged by that law when they fail to obey it.
All Scripture is inspired by God and is useful to teach us what is true and to make us realize what is wrong in our lives. It corrects us when we are wrong and teaches us to do what is right. God uses it to prepare and equip his people to do every good work.