Prep the oven and dish: Preheat your oven to 375°F (190°C).
Grease a 9x13-inch baking dish with cooking spray.
Blanch or steam the broccoli: For fresh broccoli, steam or blanch in salted boiling water for 2–3 minutes until bright green and slightly tender. For frozen broccoli, thaw and pat dry. Set aside.
Sauté aromatics: In a large skillet or saucepan, melt the butter over medium heat.
Add the onion and a pinch of salt. Cook 4–5 minutes until soft and translucent. Add the garlic and cook 30 seconds, stirring.
Make the roux: Sprinkle in the flour and cook, stirring constantly, for 1 minute to remove the raw flour taste.
Build the sauce: Slowly whisk in the milk, then the broth.
Keep whisking to smooth out any lumps. Simmer 3–4 minutes until slightly thickened and creamy.
Add seasonings and cheese: Stir in Dijon (if using), paprika, pepper, red pepper flakes, and salt. Reduce heat to low.
Add 1 1/2 cups cheddar and all the Parmesan. Stir until melted and smooth.
Finish the base: Remove from heat and fold in the sour cream. Taste and adjust salt and pepper as needed.
The sauce should be well-seasoned.
Combine with rice and broccoli: In a large bowl, mix the cooked rice and broccoli. Pour the cheese sauce over and stir until everything is evenly coated.
Assemble: Spread the mixture in the prepared baking dish. Top with the remaining 1/2 cup cheddar.
Optional crunchy topping: Toss panko with olive oil or melted butter and sprinkle over the top for extra crunch.
Bake: Bake for 20–25 minutes, until bubbling at the edges and lightly golden on top.
If you want more color, broil for 1–2 minutes at the end, watching closely.
Rest and serve: Let the casserole sit for 5–10 minutes so it sets slightly. Scoop and serve warm.