Wash and sanitize a pint-sized glass mason jar. Fill the jar with the sliced onions and top with the oregano and cumin, if using.
Make the brine. In a small saucepan, heat the vinegar, water, salt, and sugar together until just warm and the sugar and salt have dissolved. Cool the liquid for 5 minutes.
Pour the warm brine over the onions. Place the lid on the jar and shake gently to disperse the spices.
Keep in the refrigerator until ready to use. Homemade pickled onions will keep for 2-3 weeks in the refrigerator.