There was an intervening day between two "Sabbaths."
The Special ceremonial Sabbath (the first day of the Passover, a Special Sabbath, being that year on Thursday), and the weekly Sabbath (always on Saturday).
When Jesus was laid in the tomb late Wednesday afternoon Mary Magdalene and the other women were there (Matt. 27:61; Mark ; Luke ).
They then rested on the Passover Sabbath, Thursday.
And "when the (Passover) Sabbath (on Thursday) was over, Mary Magdalene, and Mary the mother of James, and Salome, bought spices, that they might come and anoint Him." (Mark 16:1)
Then, "they returned and prepared spices and perfumes," (Luke 23:56a) which they had just purchased. The guards of the Tomb were still there. "And on the (Saturday) Sabbath they rested according to the commandment." (Luke 23:56b)
Jesus arose just before sunset Saturday (he, the teacher of the truth that the Man is the owner and Lord of the Sabbath).
The women actually came to anoint the body of Jesus on early Sunday morning, since they did not know that He had already arisen (they did not knew that Nicodemus and his servants had already anointed and covered the body).
The owner of the Tomb himself did not anoint the body, because he understood and believed in the Resurrection of Jesus Christ after three days and three nights.