Prepare your vegetables: Wash and thinly slice the cucumbers and red onion. A mandoline slicer works wonders here for uniform slices, but a sharp knife will do the job too. Mince or thinly slice the garlic.
Combine the brine: In a medium saucepan, whisk together the apple cider vinegar, water, sugar, and kosher salt until the sugar and salt are dissolved. Add the peppercorns, mustard seeds, and optional red pepper flakes.
Heat the brine: Bring the brine mixture to a gentle boil over medium heat. Let it simmer for about 2-3 minutes to allow the flavors to meld.
Assemble the jars: While the brine is heating, pack the sliced cucumbers, red onion, dill, and garlic into clean, airtight jars. Leave about a half-inch of headspace at the top.
Pour and chill: Carefully pour the hot brine over the vegetables in the jars, ensuring everything is submerged. Leave about 1/4 inch of headspace. Seal the jars tightly with lids.
Let them pickle: Allow the jars to cool to room temperature on the counter for about 30-60 minutes. Then, transfer them to the refrigerator. The pickles will be ready to eat in as little as 2-3 hours, but they are best after at least 24 hours for the flavors to fully develop.