Caramelise the onions: In a skillet, melt butter over medium-low heat. Add onions and sugar. Cook slowly, stirring often, until golden brown and soft (about 15–20 minutes).
Cook the bacon: Fry until crispy. Set aside on paper towels.
Form and cook patties: Divide beef into 4 small patties. Season with salt and pepper. Grill or pan-fry 3–4 minutes per side. Add cheese slices during the last minute.
Assemble the burger: Toast buns. Layer patty, bacon, onions, and another patty. Add toppings if desired.