God appointed a worm that attacked the plant so that it withered Jonah 4:7. Then God appointed a scorching east wind, and the sun beat down on Jonah’s head Jonah 4:8.
In Jonah 4:7–8, the shade Jonah had just enjoyed is removed in two steps. First, at dawn God appoints a worm to damage the plant until it withers. Then, as the sun rises, God appoints a hot east wind, and the sunlight beats down on Jonah’s head until he grows weak. Jonah again asks to die and repeats his judgment that death is better than living. These verses continue the final scene of Jonah, where Jonah sits outside Nineveh watching what will happen to the city after his warning (4:5). God had just appointed a fast-growing plant to give Jonah shade and relief, and Jonah was very glad about it (4:6).
Jonah’s comfort is removed in a deliberate sequence: first the plant is damaged at dawn, then Jonah is exposed to oppressive heat after sunrise (Jonah 4:7–8). The text explicitly credits these events to God “preparing” (appointing) the worm and the hot east wind (prepared).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Jonah 4:7, then read the surrounding section so the answer stays connected to the passage's flow.
7But God prepared a worm at dawn the next day, and it chewed on vine, so that it withered.