John defined sin as transgression of the law. Not just any law, but the Law of God as given through Moses, aka Torah. Long after Jesus' death and resurrection, John (and all the other Apostles) were still teaching people to keep God's commandments, just like Jesus did. That's why I do too.
https://www.americantorah.com/....2021/03/04/a-dialogu