All four are possible. The difference, as usual for questions of aspect in English, is not in the circumstances described, but in the way the speaker/writer chooses to refer to them and to relate them to other events.
In the absence of any particular context, the second is much the most likely. You would only use the third or fourth forms if you were setting the event relative to some later event; and as user178049 says, for hours refers to a long activity, so the continuous "was cooking" is more likely; but if this is the first sentence in a continuing narrative of things that happened after the cooking, the first would be more likely.