Preheat your oven to 375°F (190°C).
Steam broccoli florets for 3–4 minutes until slightly tender. Set aside.
In a skillet, heat olive oil over medium heat. Sauté onion and garlic until translucent.
Add sliced mushrooms, salt, pepper, and thyme. Cook for 5 minutes, stirring occasionally.
Sprinkle in flour and stir well. Slowly add heavy cream, cooking until sauce thickens.
Remove from heat and mix in cheese until melted.
Combine broccoli and mushroom mixture in a greased casserole dish. Top with breadcrumbs if desired.
Bake for 25–30 minutes, until bubbly and golden on top.
Let cool for 10 minutes before serving.