Prepare the onions: Peel and thinly slice the red onion. Aim for consistent thickness so they pickle evenly.
Combine brine ingredients: In a small saucepan, combine the apple cider vinegar, water, sugar, and salt. If using, add peppercorns and bay leaf.
Heat the brine: Bring the mixture to a gentle simmer over medium heat, stirring until the sugar and salt are completely dissolved. Do not boil.
Pack the jar: While the brine heats, place the thinly sliced red onions into a clean glass jar with a tight-fitting lid. Add any optional herbs like dill or thyme.
Pour and seal: Once the brine is ready (sugar and salt dissolved), carefully pour the hot liquid over the onions in the jar. Ensure the onions are fully submerged. Discard the bay leaf if used.
Cool and refrigerate: Let the jar cool on the counter for about 30 minutes. Once cooled, secure the lid and transfer the jar to the refrigerator. The onions will be ready to eat after at least 30 minutes, but the flavor deepens significantly after a few hours or overnight.