Prepare the vegetables: Wash and slice cucumbers or other vegetables into your desired shape (slices, spears, or coins).
Make the brine: In a small saucepan, combine water, vinegar, sugar, and salt. Bring to a simmer until sugar and salt dissolve. Remove from heat and let cool slightly.
Add spices: Place garlic, peppercorns, mustard seeds, dill, and red pepper flakes at the bottom of clean glass jars.
Pack the vegetables: Pack the sliced vegetables tightly into the jars, leaving about 1/2 inch of space at the top.
Pour the brine: Pour the warm (not boiling) brine over the vegetables, making sure they are fully submerged.
Seal and cool: Seal the jars with lids and allow them to cool to room temperature.
Refrigerate: Place the jars in the refrigerator. The pickles are usually ready to eat in 24–48 hours.