Heat 2 tablespoons oil in a medium frying pan over medium heat. Add the 2 chopped chiles and 1 chopped onion and season with salt and pepper. Cook until vegetables are starting to brown and soften, about 8 minutes. Add 3 cloves garlic and cook a minute more. Remove from heat and cover to keep warm.
Divide 1 pound ground beef into 4 pieces and flatten gently into patties. Press a shallow indentation with your thumb into the center of each beef patty; this prevents the burgers from puffing up into balls on the cast iron pan. Drizzle lightly with oil, rubbing the oil over the patties to coat and season generously with salt and pepper.
Make cayenne mayo by combining the 1/2 cup mayonnaise, 1 tablepoon lime juice, 1 teaspoon lime zest, 1/2 teaspoon kosher salt, and 1/4 teaspoon cayenne pepper in a medium bowl, whisking until smooth. Set aside.
Heat 1 tablespoon oil in a large cast iron skillet over medium heat and cook hamburgers on one side, without disturbing until browned, about 5 minutes. Flip and cook on the other side until they are done to your liking (about another 5 minutes for medium).
Turn off the heat and top each burger with a generous spoonful of the chile mixture. Top the burgers with a slice of cheese and cover the pan with a lid until the cheese melts.
While cheese is melting, toast the buns.
Spread a generous spoonful of the mayonnaise on one side of the bun, place the hamburger over the mayonnaise and top with the other side of the bun. Serve immediately with any garnishes like lettuce or tomato for people to make their own burgers.