וַיְכַ֤ל אֱלֹהִים֙ בַּיּ֣וֹם הַשְּׁבִיעִ֔י מְלַאכְתּ֖וֹ אֲשֶׁ֣ר עָשָׂ֑ה וַיִּשְׁבֹּת֙ בַּיּ֣וֹם הַשְּׁבִיעִ֔י מִכָּל־מְלַאכְתּ֖וֹ אֲשֶׁ֥ר עָשָֽׂה׃
하나님의 지으시던 일이 일곱째 날이 이를 때에 마치니 그 지으시던 일이 다하므로 일곱째 날에 안식하시니라
Rashi
ויכל אלהים ביום השביעי AND ON THE SEVENTH DAY GOD FINISHED — R. Simeon says: A human being (literally, flesh and blood) who cannot know exactly his times and moments (who cannot accurately determine the point of time that marks the division between one period and that which follows it) must needs add from the week-day and observe it as the holy day (the Sabbath), but the Holy One, blessed be He, who knows His times and moments, began it (the seventh day) to a very hair’s breadth (with extreme exactness) and it therefore appeared as though He had completed His work on that very day (Genesis Rabbah 10:9). Another explanation: What did the world lack? Rest! Sabbath came — Rest came; and the work was thus finished and completed (Genesis Rabbah 10:9)!
Be'er Mayim Chaim
On the seventh day God finished the work that He had been doing, and He rested on the seventh day, etc.: Meaning God surely completed and finished all of the work on the seventh day. But with what? "And He ceased on the seventh day" - with this, that He rested, and He made it into a day of rest and joy, which was the end of the thought of creating the entire work of the heavens and the earth. It is with this that He finished and accomplished the end of their making. And with this, the words of our Rabbis about this verse are sweetened (Bereishit Rabbah 10:9): Geniva said, "This is analogous to a king who made himself a wedding canopy, painted it and embossed it. What was it lacking? A bride to enter it. So, too, what was the world lacking? Shabbat," etc. To here [is the midrash]. The commentators there were hard-pressed to explain what the world was missing without Shabbat. But according to our words, it is very correct, since the Shabbat to the world is exactly like a bride to the wedding canopy. For the entire existence of the world was only created to prepare the meal and the joy of the Shabbat day. And before the Shabbat day arrived, everything was lacking. So the seventh day completed and finished the work, the packed day of joy. Then the bride went up to the wedding canopy, as mentioned.
Chizkuni
ויכל אלוקים ביום השביעי, “the Lord had completed on the seventh day;” at first glance this wording gives the impression as if G-d had still been working on the seventh day; seeing that on the sixth day it had not yet been known that this was the last day on which G-d performed creative activities, there is no contradiction. This became known only in retrospect on the seventh day through G-d’s abstaining from any such activity.