As per RealSimple, using the best ripe avocados and mashing the ingredients with a traditional Mexican mortar called a molcajete are some of the secrets to making a delicious guac dip. However, the right onions can make a massive impact on the final result of the recipe.
White onions are the most common option, giving sweetness and freshness to the dip, and red onions have a bolder, spicier flavor. Yellow onions, on the other hand, should be rinsed under hot water to get rid of any bite before adding them to the recipe.
There are also other types of onions that can bring different flavors or textures to the famous dip. Typically used as garnish, scallions or green onions are "immature onions that have not yet formed a bulb" and can be finely chopped, grilled, or mashed with other ingredients to make a bowl of guac.
Shallots add an intense flavor and are best to use in small amounts. Other onions like Vidalia, Walla Walla, or Mauic are mild-flavored sweet onions that give the guacamole a mild but distinct taste.
Garlic can also be used as an alternative as it packs a powerful flavor and has numerous health benefits. For guacamole, it's best to use cooked garlic rather than raw since high temperatures reduce its sharpness and increase its sweetness.