In a deep skillet or Dutch oven, add the raw bratwurst, 1 sliced onion, the beer (enough to cover the sausage), and ½ of a stick of butter cut into cubes.
Bring the water to a slow boil, turn down the heat to medium-low, and simmer the brats for 10 minutes. They should be mostly cooked (aka par-boiled) and will finish cooking when you grill or pan cook them.
Remove the bratwurst from the liquid and either grill them on a preheated grill for 10-14 minutes until browned. Or you can pan fry them in a skillet with a little oil or butter for 3 minutes on each side. Add the onions back to the pan also if you're pan-frying them to serve with the sausages.
Notes
Never prick the bratwurst before cooking them, you lose flavor and moisture
Swap the beer for broth or water if you don't like beer or can't have it
Michelob Light is a good option if you're on a low carb diet
You can easily double or triple the recipe if you're serving a group, you might need to increase the liquid.