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.
For more on this, see “Lord of the Sabbath: Did Jesus Christ Break the Sabbath?”