Bring a large pot of salted water to a rolling boil. Add the dry spaghetti and cook until al dente, about 8–10 minutes.
Before draining, reserve 1/2 cup of the pasta cooking water, then drain the spaghetti in a colander.
In a large skillet over medium-low heat, melt the butter. Add the minced garlic and sauté for about 1 minute until fragrant but not browned.
Pour in the heavy cream and bring to a gentle simmer over medium heat. Let it simmer about 10 minutes, stirring occasionally, until slightly thickened.
Season the sauce with Kosher salt and black pepper to taste.
Lower the heat to low and add the drained spaghetti to the skillet. Toss to coat the pasta in the sauce, adding reserved pasta water a little at a time if the sauce is too thick, until you reach the desired consistency.
Stir in the grated Parmesan until it melts into the sauce and evenly coats the spaghetti. Taste and adjust seasoning if needed.
Serve immediately, garnished with chopped fresh parsley if desired.