Place the squash, onion, and salt in a colander, toss to coat and place over a bowl. Cover and refrigerate overnight.
Drain and rinse the squash well. Place in a 1 ½ cup capacity jar (I use a quart jar) with the dill.
Place the vinegars, sugar, and the red pepper flakes in a saucepan over high heat and stir until the sugar is dissolved. Bring to a boil and cook for about 5 minutes.
Pour the warm brine over the squash, add a lid to the jar, and store in the refrigerator.
Notes
You can use all yellow squash, all zucchini, or a combination. These should keep for 3-4 weeks in the fridge. They will keep longer, but the quality may decline, so it is best to eat them within that time frame.