The reason the Jesus came to earth was to pay for our sins. So what is sin?
Sin (by definition) is - transgression of the law. By law, it means the moral law of God, as summarily found in the 10 commandments.
In Romans 7:7 the Apostle Paul says, “I would not have known sin, except through the law.”