Bring 1 cup distilled white vinegar, 2 tablespoons kosher salt, 2 teaspoons sugar, up to 2 tablespoons spices (e.g., peppercorns, coriander seeds, and/or mustard seeds), and 2 cups water to a boil in a saucepan. Pour over vegetables in jars.
Divide 1 1/2 pounds green beans, trimmed, 1 lemon, thinly sliced, seeds removed, 4 chiles de árbol (if desired), and 4 smashed garlic cloves between jars.
Dividing evenly, pour hot brine (see formula, left)—using 1 teaspoons crushed red pepper flakes for the spice—into jars and cover. Let cool, then chill.
Green beans can be pickled 2 months ahead. Keep chilled.