Sterilize a wide-mouth 1-quart mason jar. See the below notes for sterilization tips. (Note 3)
Cut the tomatoes into small wedges (or your desired thickness) and transfer to a the large mason jar (or 2 smaller Mason jars) along with the onion slices. Stuff in as many as you can.
Add the vinegar, water, salt, sugar, dill, black peppercorn and red pepper flakes to a small non-reactive saucepan and heat over medium heat until the sugar and salt are dissolved (approx. 2-3 minutes). Stir occasionally.
Remove the pan from the heat and let slightly cool before ladling the brine over the tomato wedges. Leave about 1/2"-1" of space at the top of the jar.
Add the smashed garlic cloves and push down slightly so they're in the brine.
Use a butter knife or chopstick to tap on the bottom of the glass to remove hidden air pockets.
Once the jars are cooled to room temperature, cover with the matching metal lids. Refrigerate for a minimum of 1 hour before serving.