Boil salted water and cook spaghetti until al dente, then drain and reserve some pasta water for later use. This ensures the pasta maintains the right texture when mixed with sauce.
Heat oil and cook seasoned chicken pieces until golden and fully cooked, then set aside to retain their juiciness.
Melt butter in the same pan, sauté onion until soft, and add garlic briefly to build a flavorful base without burning.
Stir in flour to create a roux, then slowly whisk in milk and broth until the sauce thickens smoothly.
Add cheese and seasonings on low heat, stirring until fully melted and creamy without curdling.
Combine cooked chicken and pasta with the sauce, adjusting consistency with pasta water if needed before serving.