In a large skillet set over medium heat, melt the: Unsalted butter Once the butter has melted and the white foam subsides, add the: Sliced onions Cook, using a wooden spoon to stir occasionally, until the onions are soft and golden, about 20 minutes.
Add the: Irish whiskey If you have a gas burner, carefully tilt the pan toward the flame to flambé the onion-and-whiskey mixture. If you have an electric or induction cooktop, use a long match to flambé the whiskey (or you can skip the flambéing altogether). Stir in the: Granulated sugar Cook, stirring occasionally, until the onions turn a darker shade of brown, 4 to 6 minutes. Stir in the: Pinch of kosher salt All-purpose flour Finely chopped garlic Cook until the garlic is fragrant, about 2 minutes. Then, while stirring, pour in the: Dark Irish beer Simmer, stirring occasionally, until the dark beer is reduced by one-third, about 5 minutes.
Add the: Beef stock Remaining 1½ teaspoons kosher salt Freshly ground black pepper Bring the soup to a simmer. Reduce the heat to medium-low and cook for 20 minutes.
Adjust an oven rack to the upper-middle position and heat the broiler to high. Divide the soup among 4 oven-safe bowls and set them on a rimmed baking sheet. To each bowl, add 2 bread slices Cover each slice of bread with 2 pieces of the: 2 pieces sliced sharp cheddar Set the rimmed baking sheet on the upper-middle oven rack and broil until the cheese is melted, golden and bubbling, 3 to 5 minutes (watch the cheese closely, as broiler intensities vary). Remove from the oven and serve immediately.