Fill a large pot with water and add 1 tablespoon of salt for every 2 quarts of water. Bring the water to a rolling boil. This will serve as the cooking base for your pasta later.
While the water is heating up, heat the extra-virgin olive oil or unsalted butter in a large sauté pan over medium heat. Add the pancetta or thick-cut bacon pieces and cook slowly until they become crispy. Add the minced garlic (if using) and cook for about a minute, just until fragrant. Once done, turn off the heat and transfer the pancetta and garlic mixture into a large mixing bowl.
In a small bowl, beat the whole eggs thoroughly. Mix in about half of the grated parmesan or pecorino cheese until well combined. This will become the base for your creamy carbonara sauce.
Once the salted water is boiling, add the spaghetti, bucatini, or fettuccine and cook uncovered until the pasta is al dente, according to package directions. Reserve about a cup of the starchy pasta cooking water, then quickly transfer the cooked pasta (while still dripping wet) with tongs into the bowl with the pancetta and garlic (from Step 2). This ensures the pasta stays hot enough to create a creamy sauce in the next steps.
Toss the hot, dripping-wet pasta (from Step 4) with the pancetta and garlic mixture (from Step 2) in the large bowl. Mix well so the pasta starts to absorb the flavors and cools down just enough to avoid scrambling the eggs in the following step.
Add the beaten egg and cheese mixture (from Step 3) to the bowl with the pasta, pancetta, and garlic. Immediately and quickly toss everything together until the sauce thickens and becomes creamy, adding a small splash of reserved pasta water as needed to achieve your desired consistency. Season with salt to taste, and top with the remaining grated cheese and freshly ground black pepper. I like to use plenty of black pepper for a true carbonara kick!