Bring a large pot of salted water to a boil. Add the spaghetti and cook until al dente according to package instructions, usually about 8–10 minutes. Drain well and set aside.
In a skillet, heat the olive oil over medium heat. Add the diced chicken breasts and cook until no longer pink in the center, about 6–8 minutes. Remove from heat and set aside.
In the same skillet, add the minced garlic and sauté for about 1 minute until fragrant. Pour in the heavy cream and stir in the Parmesan cheese, sour cream, Italian seasoning, salt, and black pepper. Cook on low heat, stirring frequently, until the sauce thickens slightly and becomes smooth and creamy.
Transfer the cooked spaghetti to a large mixing bowl. Pour the creamy sauce over the pasta and toss gently to coat every strand. Add the cooked chicken and half of the shredded mozzarella cheese, mixing to combine evenly.
Preheat your oven to 375°F (190°C). Lightly grease a 9-inch pie dish or similar baking dish. Pour the spaghetti mixture into the dish, pressing down gently to compact it. Sprinkle the remaining mozzarella cheese on top for a melty, golden crust.
Place the pie in the oven and bake for about 20–25 minutes until the cheese is melted, bubbly, and lightly browned on top.
Remove from the oven and let the pie rest for 5 minutes. Sprinkle with freshly chopped parsley for a pop of color and freshness. Slice into wedges and serve warm.