Preheat an oven to 350°F and lightly grease a 9x9 baking dish.
Melt the butter in a large saucepan over medium heat. Add in the onions and sauté until translucent. Stir in the minced garlic and cook for 30 seconds.
Now whisk in the flour to make the roux. Gradually add the chicken stock, whisking constantly to incorporate the roux thoroughly. Then, pour in the milk and continue cooking until the mixture thickens.
Stir in 1 ½ cups of the cheese until it's completely melted and blended into the sauce. Add in the broccoli, salt and pepper. Stir to combine. Continue cooking for one minute. Remove from the heat. Stir in the cooked rice. Taste and adjust the seasoning if needed.
Transfer the mixture to the prepared baking dish, sprinkle the remaining cheese on top, cover with foil, and bake for 30 minutes. Then remove the foil and continue to bake for another 10 minutes to lightly brown the cheese on top, if desired. Enjoy!