Why are you allowed to cook on yom tov but not on shabbas? I understand that there are certain rules about cooking, but why can't we do that on shabbas?
The Torah uses two different terms for "work," מלאכה and עבודה. In the case of Shabbos, the Torah consistently says that no מלאכה may be done on it (Ex. 20:9, 31:14-15, 35:2; Lev. 23:3; Deut. 5:13). By contrast, with Yom Tov, the Torah states in several places that מלאכת עבודה is prohibited (Lev. 23 passim, Num. 28-29 passim).
Ramban (to Lev. 23:7) explains that עבודה, by definition, means work done for purposes other than food preparation. So with Shabbos, since the Torah never says anything about עבודה, all forms of work are off-limits. On Yom Tov, food preparation is permitted because, as he puts it, it's not מלאכת עבודה but מלאכת הנאה (work whose products you enjoy).
This is spelled out in the verse referenced in Yahu's comment below, Ex. 12:16: "no מלאכה may be done on [Yom Tov], except what is eaten..."
In the Baseline cooking is Not allowed on Yom Tov.The reason for the Issur on Shabbos and Yom Tov is we do not do creative work that was done in The Mikdash or Mishkan or according to another opinion in their preparation, hence since they made the Lechem Hapanim by using fire cooking is Assur .
The heter on Yom Tov is because it says by Yom Tov "Vsamachteh Bichachah" You should Rejoice on the Holiday, but Shabbos we are only told to Honor and watch it and since food is essential to Rejoicing as we know the Rambam says there is no joy other than Meat and wine so we allow cooking.
To illustrate the point: cooking for a gentile is an Issur Doraisia there are conditions where cooking for Jews is allowed. This Heter is called Oichel Nefesh and that too has conditions you are only allowed exactly enough for the amount of people you have, and only for Yom Tov and not afterwards, just again that there is a Heter that maybe a guest will come and the Gemara beings down the case of baking when there is more bread in the oven it improves the taste of Bread and again since good tasting food makes it more Joyfull there is a heter on yom tov as it will make the food eaten on yom tov better based on the formentioned posuk of being Joyful on Yom Tov.