Bring a large pot of salted water to a boil. Add the spaghetti and cook according to the package instructions until al dente, usually about 8-10 minutes. The pasta should be cooked but still firm to the bite. Drain the pasta and set it aside.
Preheat your oven to 350°F (175°C).
In a large skillet, melt the butter over medium heat. Add the chopped onion and minced garlic. Cook until the onion is translucent and garlic is fragrant, about 3-4 minutes.
Add the sliced mushrooms to the skillet. Cook until they're soft and their moisture has evaporated, about 5 minutes.
Sprinkle the flour over the mushrooms. Stir and cook for 1 minute to remove the raw flour taste. Gradually pour in the chicken broth and milk, stirring constantly to prevent lumps.
Stir in the heavy cream, salt, pepper, and dried thyme. Bring the mixture to a simmer and let it thicken slightly.
Add the cooked chicken and al dente spaghetti to the sauce. Toss to combine everything well. Mix in the frozen peas and half of the Parmesan cheese.
Transfer the mixture to a greased 9x13 inch baking dish. Sprinkle the top with mozzarella and the remaining Parmesan cheese. Bake in the preheated oven for 20-25 minutes, or until the cheese is bubbly and golden.
Let the Chicken Tetrazzini cool slightly before serving. Garnish with chopped fresh parsley. Serve warm and enjoy!