Wash all the veggies. Slice cherry tomatoes in half, red onion into thin rings, and cucumber into rounds.
Place them into clean glass jars—layered or mixed, your choice. For a neat look, layer cucumber first, then onion, and tomatoes on top.
In a saucepan, combine vinegar, water, sugar, salt, smashed garlic, and peppercorns. Heat over medium, stirring until sugar and salt dissolve. Let it simmer for 2 minutes, then turn off the heat.
Carefully pour the hot brine over the veggies until fully covered. Add red pepper flakes or fresh dill if desired. Let jars cool to room temperature, then seal with lids.
Refrigerate for at least 2 hours before serving. For deeper flavor, let them sit overnight. The longer they chill, the better they taste.