It's better to use cooked garlic in pasta, as it mellows the flavor and adds a rich, sweet depth to the dish.