Start by preheating your oven to 400 degrees F (200 degrees C). Chop the tops off the garlic heads. Drizzle some oil over them and wrap them tightly in aluminum foil. Roast for about 30-35 minutes until tender and fragrant. You will smell that amazing garlic aroma filling your kitchen.
Boil water in a large pot and cook your pasta according to package directions until it's al dente. Reserve about 1 cup (240 ml) of pasta water before draining.
In a pan over medium heat, melt the butter and let it bubble while stirring. Do not let it brown too much, as burnt butter can affect the flavor.
Sprinkle in the flour and whisk it together with the butter for about 1 minute until it thickens and turns a light golden color.
Gradually add the heavy cream while continuously whisking for about 3-4 minutes. The sauce will start to thicken and look creamy. Avoid letting it come to a full boil.
Once the cream is well incorporated, stir in the grated Parmesan and cream cheese. Mix until melted and smooth. Use freshly grated cheese to avoid clumping.
Squeeze the roasted garlic cloves into the sauce and mix thoroughly. If the garlic flavor is too strong for your taste, add a splash more cream.
Add the drained pasta to the sauce and toss gently to coat. The pasta will soak up the sauce. Be careful to avoid breaking the pasta pieces apart.
Sprinkle salt and black pepper over the pasta and give everything a final toss. Taste to ensure the flavors are just right.
Plate the garlic Alfredo pasta immediately. For a creamier texture, drizzle in some reserved pasta water if it appears too thick.