Cook spaghetti according to package instructions. Drain and set aside.
In a large skillet, melt butter over medium heat. Sauté onions until soft, about 3 minutes.
Add garlic and cook for another 30 seconds.
Stir in the cooked chicken, cream of chicken soup, sour cream, and chicken broth. Mix well.
Season with salt and pepper. Let the mixture simmer for 5 minutes.
Add the cooked spaghetti to the skillet and toss until well combined.
Sprinkle cheddar and Parmesan cheese over the top and cover with a lid for 2-3 minutes until cheese melts.
Garnish with chopped parsley if desired. Serve warm.