Begin by preparing the broccoli. Steam the florets for about 5 minutes until they are tender yet still bright green. Set aside.
In a large saucepan, melt the butter over medium heat. Add the diced onion and sauté for about 3-4 minutes until translucent.
Sprinkle the flour over the cooked onions, stirring constantly for about 1 minute to create a roux. This will help thicken your dish.
Gradually whisk in the milk and vegetable broth. Continue stirring until the mixture thickens, which should take about 5-7 minutes.
Once the mixture is thickened, stir in the garlic powder, salt, black pepper, and cayenne pepper if using. Mix well.
Add the steamed broccoli florets to the saucepan and stir to combine them with the sauce.
Remove the pan from heat and fold in the shredded sharp cheddar cheese until melted and fully incorporated.
For an extra touch, you can transfer the mixture to a baking dish, sprinkle grated Parmesan cheese on top, and broil it for a few minutes until the top is golden brown.