It is forbidden to do anything on Shabbat for a post-Shabbat need, a concept known as "hachana". This is true even if it requires no significant effort. One may not even prepare for something needed or taking place immediately after Shabbat. It is also forbidden to do anything on Shabbat for the sake of a future Shabbat. Yom Tov is similar in this regard, and it is forbidden to do anything on the first day of Yom Tov (in the Diaspora) for the second day of Yom Tov.
The primary reason that hachana is forbidden on Shabbat is due to the closely related concept of "tircha". Tircha is the prohibition against doing any unnecessary work or chores that detract from the Shabbat atmosphere, even if no technical violation of Shabbat takes place. This is true even if the hachana is for a mitzva-related purpose.
Nevertheless, routine, effortless activities are permitted even if they are being done with the intention of serving a post-Shabbat need. For example, after seudat shlishit it is permitted to return leftover food to the refrigerator even though one's true intention for doing so is in order for the food to remain fresh for use later on in the week. Many authorities permit placing food into the freezer for long-term storage, as well. These activities are also permitted because they are activities that serve to prevent a loss, namely, the spoilage of the food, as will be discussed below. So too, one is permitted to carry one’s tallit home after Shabbat morning services (in a place where there is an Eruv) even if one’s intention for doing so is to have one’s tallit ready for use Sunday morning. This is because carrying a tallit home after services on Shabbat morning is a widespread, effortless, and routine activity.
One may invite someone that one encounters on Shabbat to a weekday event as doing so makes the person happy and takes no effort. One may dress children in their pajamas on Shabbat even though they will not be going to sleep until after Shabbat ends. It is permitted to study for a test on Shabbat even though the test will be taking place on another day. This is especially true if the material being studied is Torah-related.
It is also permitted to do something that has a Shabbat benefit as well as a benefit for the coming weekday(s). For example, one is permitted to tidy up the house, clean off a table, wash the dishes, make the beds, or otherwise do something that gives the home a pleasant Shabbat appearance even though the benefits of such activities continue to be enjoyed after Shabbat has ended. So too, one may take a nap on Shabbat even if the purpose for doing so is in order to be more awake for a Saturday night activity. It is important to note that even when one is permitted to do something which has a post-Shabbat benefit, one must not state that one is specifically doing it for the post-Shabbat need. This is true even if it is for a mitzva.
It is permitted, however, to perform hachana- type activities in order to prevent a loss, such as returning items to a fridge or freezer, as was mentioned above. This is true even if some effort or exertion is required, as long as it is minimal. For example, it is permitted to place a lulav bundle in a vase of water on Yom Tov in order for it to stay fresh. Some authorities permit asking a non-Jew to perform an activity that is otherwise forbidden due to the principles of hachana.
 Shabbat 113a; Mishna Berura 302:19; Shemirat Shabbat K’hilchata 28:70.
 Some authorities do permit an act of preparation on Shabbat for a future Shabbat, such as folding a tallit or washing dishes. See Salmat Chaim 74.
 OC 503:1.
 Shulchan Aruch Harav, OC 323:6; Mishna Berura 323:28. See Rambam, Hilchot Shabbat 23:7 with Raavad.
 Shemirat Shabbat K’hilchata 28:69.
 Shemirat Shabbat K'hilchata 28:81,89.
 Minchat Yitzchak 8:24; Be'er Moshe 1:25, 8:202; Rivevot Ephraim 3:234, 5:261.
 Ibid. Rivevot Ephraim 1:250; Teshuvot V’hanhagot 1:227; Machazeh Eliyahu 61:8:1; Nishmat Shabbat 1:383:2; Tefila L’moshe 4:17; Orchot Shabbat 25 note 274.
 Shemirat Shabbat K’hilchata 28:81.
 Shemirat Shabbat K’hilchata 28:81. See also Shemirat Shabbat K’hilchata Chapter 10 note 27.
 Rivevot Ephraim 8:185:1; Lev Chaim 3:72.
 Igrot Moshe, OC 4:105.
 Shemirat Shabbat K’hilchata 28:84 note 169, 206; Shevet Hakehati 2:144:5.
 Maharshag 1:61; Mishna Berura 302:19; Tzitz Eliezer 14:37; Shemirat Shabbat K'hilchata 28:78,79. But see Kaf Hachaim, OC 302:23.
 Rema, OC 290:1; Mishna Berura 290:4.
 Mishna Berura 290:4; Elya Rabba 254; Shemirat Shabbat K’hilchata 28:72.
 Shaarei Teshuva 290:1.
 Beitza 35b; OC 338:7; Magen Avraham 254:23; Mishna Berura 254:43.
 OC 654:1.
 Magen Avraham 110:13; Mishna Berura 319:62l; Pri Megadim 503.