Preheat your oven to 400°F (200°C). In a large skillet, heat olive oil over medium heat. Add the sliced onions and minced garlic, and sauté until softened and golden brown, about 5 minutes.
Push the onions and garlic to the side of the skillet and add the bratwurst sausages. Brown them on all sides, about 5 minutes total. Pour in the beer, enough to cover the brats halfway. Bring to a simmer and let it cook for about 5 minutes.
Transfer the brats and onions to a baking dish if needed (unless you use a large cast iron oven proof skillet and it is large enough to hold everything comfortably) Pour beer mixture from pan over meat if transferring to a dish.
Season with a pinch of salt and pepper. Bake in the preheated oven for 20 minutes, or until the brats are cooked through to 160 degrees F in the middle and browned.
Serve inside hoagie rolls, topped with mustard and sauerkraut if desired. Enjoy!