Then they went into Capernaum, and immediately on the Sabbath He entered the synagogue and taught.
In the parallel passage in the Gospel of Luke, Luke records that Jesus Christ “was teaching them on the Sabbaths” (Luke 4:31). Earlier, Luke recorded that in Nazareth, “as His custom was, He went into the synagogue on the Sabbath day, and stood up to read” (Luke 4:16).
Jesus Christ’s custom and practice was to remember the Sabbath and to teach people on that day. He did not change or break the Sabbath that He had created. He did not break God’s law, though He did show that the extra restrictions that people had added were not from God.
For more on this, see “Lord of the Sabbath: Did Jesus Christ Break the Sabbath?”