While your pasta is cooking, heat the olive oil in a large skillet (12-inch is ideal) over medium-high heat. Let it warm for about 30 seconds—you'll see it shimmer slightly.
Add the finely diced onion and cook for 3-4 minutes, stirring occasionally. You're looking for the onion to become translucent and slightly soft, with the edges just beginning to turn golden. This process, called sweating the onions, releases their natural sugars and creates a sweet, mellow base.
Add the sliced garlic and cook for another 30-45 seconds until fragrant. You'll smell that wonderful garlic aroma—that's your cue. Be careful not to let garlic brown, which makes it bitter. We want it soft and sweet.