Preheatyour oven to 375°F (190°C).
In a large skillet, melt the butter or heat the oil over medium-high heat. Add the chopped onion and sauté until translucent.
Add the minced garlic and sliced mushrooms to the skillet. Cook until the mushrooms are golden brown and any liquid they release has evaporated.
Push the mushrooms and onions to the side of the skillet and add the chicken pieces.Cook until the chicken is no longer pink on the outside.
Pour in the chicken broth and heavy cream (or sour cream). Stir to combine everything. Add the dried thyme, dried rosemary, salt, and pepper. Let the mixture simmer for a few minutes until the sauce slightly thickens. Adjust the seasoning according to your taste.
Transfer the mixture from the skillet into a greased casserole dish.
Sprinkle the shredded cheese evenly over the top of the casserole.
Place the casserole dish in the preheated oven and bake for about 25-30 minutes, or until the cheese is melted and bubbly, and the casserole is heated through.
Once done, remove the casserole from the oven and let it rest for a few minutes before serving. Garnish with chopped fresh green onion before serving.