Bring a large pot of salted water to a boil. Cook the spaghetti according to the package directions until al dente.
Meanwhile, in a large saucepan over medium heat, melt the butter. Add the garlic and cook, stirring, until fragrant, 2 to 3 minutes.
Stir in the cream, lemon zest, and lemon juice, and simmer until the sauce is velvety and begins to thicken slightly, 3 to 4 minutes.
Drain the pasta, reserving 1/2 cup of the cooking water.
Reduce the heat under the sauce to medium-low and gently stir in the drained pasta, Parmesan, and basil. Keep stirring until the cheese melts and the basil wilts, 1 to 2 minutes. If a thinner sauce is desired, add some of the reserved cooking water to loosen the sauce, a spoonful at a time.
Remove the pan from the heat and season the spaghetti with salt, black pepper, and pepper flakes, to taste. Serve with more grated Parmesan and lemon slices.