In Hesiod’s Works and Days, Pandora replaced the lid after opening the jar. The action matters because it stops Hope from escaping after the other troubles have flown out into the world.
The ancient Greek vessel is generally identified as a pithos, a large storage jar used for commodities such as grain or wine. Hesiod’s wording does not describe the small hinged box familiar from modern illustrations. The replacement of the lid is therefore part of the jar scene, not a detail about a wooden chest.
Later European retellings translated or adapted the vessel into a box, which produced the enduring English expression “Pandora’s box.” Some versions say Pandora closed the lid, while others emphasize that she acted after the evils escaped. The stable point in Hesiod’s account is that Hope remained inside when the container was closed again.