Wash the green beans thoroughly and trim the stem ends. If the beans are very long, cut them into 3-inch pieces.
Prepare your jars: Place 1 smashed garlic clove, 1/4 teaspoon mustard seeds, 1/4 teaspoon peppercorns, and a pinch of red pepper flakes (if using) into the bottom of two clean pint jars. Add one dill sprig to each jar.
Pack the green beans tightly into the prepared jars, standing them upright if possible.
In a saucepan, combine the vinegar, water, pickling salt, and sugar. Bring the mixture to a rolling boil over medium-high heat, stirring until the salt and sugar dissolve completely. This is your brine.
Carefully pour the hot brine over the beans in the jars, ensuring the beans are completely submerged. Leave about 1/2 inch of headspace at the top of the jar.
Tap the jars gently to release any trapped air bubbles. Seal the jars with lids.
Allow the jars to cool on the counter for about one hour. Then, transfer the jars to the refrigerator.
Wait at least 24 hours before eating. The beans will be ready to eat after 3 days for maximum flavor absorption. Store in the refrigerator and consume within 4 weeks.
Notes
For a traditional canning method, process sealed jars in a boiling water bath for 10 minutes after sealing.
If you prefer a stronger garlic flavor, slice the garlic cloves instead of smashing them.
Use fresh, firm green beans for the best crunch. Avoid beans that are limp or have blemishes.