In a dutch oven or heavy bottomed pot, melt the butter over medium heat. Add the salt, sugar, and garlic powder, stirring to combine, followed by the onions, bratwursts, and beer. Bring the mixture to a boil. Reduce heat and simmer until bratwursts are firm to the touch, about 10-12 mins.