Most carbonara problems come from heat and technique rather than the ingredients. Scrambled eggs are the most common failure, and most other mistakes are easy to fix once you know what to look for. Whatever shape you choose, technique matters more. For the shape question itself, see linguine vs spaghetti for carbonara.
Scrambling the eggs
This is the classic error. If the pan is still over the flame when the egg mixture goes in, the eggs set into curds. Take the pan off the heat first. Then beat the eggs with the grated cheese, which helps cushion them against the heat, and toss them into the hot pasta. The warmth of the pasta and pan thickens the sauce into something glossy.
Too little heat causes its own problem. If the pan is cold, the cheese can stay grainy, so aim for warm rather than hot.
Adding cream
Traditional Roman carbonara has no cream. Its richness comes from egg yolks, cheese, rendered pork fat and the starch in the pasta water, which together form a smooth sauce. Cream is a common shortcut, and some cooks add it because it is less likely to curdle. It does change the dish, though, and makes it heavier.
Using pre-grated cheese
Pre-grated cheese often contains anti-caking agents, and it can turn clumpy or gritty in the sauce. Grate pecorino Romano or Parmesan yourself, just before you use it.
Adding too much pasta water
Pasta water loosens the sauce, but too much at once thins it and dilutes the richness of the eggs. Add it a splash at a time. Toss after each addition, and stop when the sauce is silky and clings to the pasta.
Overcooking the pasta
Pasta cooked too long turns gummy and sticky, and it holds the sauce less well. Pull it while it is still a little firm. For how that compares with soft pasta, see al dente vs soft pasta.
Choosing the wrong pork
Guanciale, cured pork jowl, is the traditional choice, and pancetta is a common substitute. Smoked bacon is often used outside Italy. It works, but the smoke changes the flavor. Render the pork slowly so it crisps, and keep some of the fat for the sauce.
Adding garlic or onion
Traditional Roman versions usually leave out garlic and onion, so the flavor of the eggs, cheese and pork can come through.
Salting too early
Guanciale and pecorino are both salty. Taste the sauce before you add any salt, and be generous with black pepper.
Three habits prevent most failures: keep the pan off direct heat, add the pasta water slowly, and pull the pasta while it is still firm.