Preheat the oven to 425°F (220°C). Grease a 10.5 by 7.5-inch or 2-quart casserole dish with butter.
Melt 2 tablespoons (28 g) of the butter in a large skillet over medium heat.
Add the diced onion and minced garlic to the skillet. Cook for about 5 minutes, stirring occasionally, until the onions soften.
Place the toasted brioche pieces in a very large mixing bowl.
Add the cooked onion mixture, rosemary, thyme, sage, parsley, onion powder, garlic powder, salt, and black pepper to the bowl.
Pour the chicken stock and beaten egg over the bread mixture. Toss everything together until the liquid absorbs into the bread.
Transfer the stuffing mixture to the prepared casserole dish, spreading it into an even layer. Scatter the remaining 6 tablespoons (85 g) of cubed butter over the top.
Cover the dish tightly with aluminum foil. Bake for 25 minutes.
Remove the foil. Bake for another 10 to 15 minutes, until the top is golden brown and the center reaches a safe internal temperature of 160°F (71°C).