Cook the spaghetti according to package instructions in a large pot of salted boiling water until al dente. Reserve 1/2 cup of pasta water, then drain the spaghetti and set aside.
In a large skillet over medium heat, melt the butter. Add the minced garlic and sauté for about 1 minute until fragrant, being careful not to burn it.
Pour in the heavy cream and bring to a simmer. Add the softened cream cheese and stir until melted and smooth.
Stir in the grated Parmesan cheese, salt, black pepper, and red pepper flakes (if using). Mix until well combined and creamy.
Add the cooked spaghetti to the skillet and toss to coat in the sauce. If the sauce is too thick, gradually add some reserved pasta water until you reach your desired consistency.
Remove from heat and garnish with chopped parsley before serving.