When your recipe calls for both sauted onions and garlic, saute the onions first - they take longer to soften. Then when the onions are almost softened, add the garlic.The garlic doesn't need very long to become fragrant - and you don't want to burn your garlic and turn it bitter!