23One sabbath he was going through the grainfields; and as they made their way his disciples began to pluck heads of grain. 24The Pharisees said to him, “Look, why are they doing what is not lawful on the sabbath?” 25And he said to them, “Have you never read what David did when he and his companions were hungry and in need of food? 26He entered the house of God, when Abiathar was high priest, and ate the bread of the Presence, which it is not lawful for any but the priests to eat, and he gave some to his companions.” 27Then he said to them, “The sabbath was made for humankind, and not humankind for the sabbath; 28so the Son of Man is lord even of the sabbath.” (Mark 2:23-28, NRSV)
The law says you can’t do work on the Sabbath, but if you are hungry and need to eat then you need to work. The day of rest was made for man because God rested. So if there is a need greater than rest that need trumps the day.
We need to remember the reason the law was given, to help us grow closer with God. So grow in your relationship not in the amount of rules you keep.