In Greek mythology, Prometheus was punished before Zeus sent Pandora to humanity.
Prometheus was a Titan who sided with Zeus during the conflict against the older Titans, but he later challenged Zeus by helping human beings. In the best-known version of the story, he stole fire from the gods and gave it to humanity. Zeus responded by ordering an elaborate punishment for Prometheus and by arranging Pandora's creation as a separate punishment affecting humans.
Prometheus's fire theft provides the immediate narrative background for Pandora. Zeus wanted to punish both the benefactor and the beneficiaries. Prometheus was chained and subjected to recurring torment, while Pandora brought the troubles that had previously been absent from mortal life.
The two myths are often blended in modern retellings, but Pandora is not the person who steals fire. That act belongs to Prometheus. Epimetheus, Prometheus's brother, is the figure who accepts Pandora despite the warning not to trust gifts from Zeus. Keeping those three roles separate makes the myth easier to follow.