Metonymy:
Metonymy is a figure of speech (or trope) in which one word or phrase is substituted for another with which it’s closely associated (such as “crown” for “royalty”).
Metonymy is also the rhetorical strategy of describing something indirectly by referring to things around it, as in describing someone’s clothing to characterize the individual. Adjective: metonymic.
A variant of metonymy is synecdoche. [ThoughtCo.]
Noted in “Ballot Box, Jury Box, Cartridge Box,” Quote Investigator:
The ballot box, the jury box, and the cartridge box.
This statement employed metonymy: the “ballot box” referred to input from the populace via the electoral process; the “jury box” referred to oversight via the judicial process; and the cartridge box referred to control via firearms.