Stir up a brine by combining the vinegar, water, and pickling salt (plus sugar if using) in a saucepan. Bring to a rolling boil, then remove from heat.
In each sterilized pint jar, pack okra upright, dividing garlic, dill, mustard seeds, peppercorns, and red pepper flakes between jars.
Carefully pour the hot brine over the okra, leaving ½-inch headspace. Tap jars gently to dislodge air bubbles.
Wipe the rims of the jars with a clean cloth, then seal with lids and bands. Let cool to room temperature.
Refrigerate for at least 12 hours (preferably 2–3 days for peak flavor) before serving. Keeps up to 1 month in the fridge.