Slice the hoagie 3/4 of the way through with a serrated knife. Cut the onion into cubes and chop into thin slices of beef.
In a small bowl, stir 2 tablespoons softened butter with 1 pressed garlic clove. Spread garlic butter over the sliced sides of four hoagie rolls. Toast the bread in a large skillet, stovetop or saj over medium heat until golden brown, then set aside.
Add 1 tablespoon of oil to the skillet/stove and fry the diced onions until caramelized, then transfer to a bowl.
Bring the mixture to a high temperature and add 1 tablespoon of oil. Spread the thin slices of meat in an even layer. Let it brown for a few minutes without disturbing, then flip it and season with ½ teaspoon salt and ½ teaspoon black pepper. Saute until the meat is fully cooked, then add the caramelized onions.
Divide the cheese into 4 equal portions, cover each with 2 slices of cheese and turn off the heat until the cheese melts without overcooking the meat.
Spread a thin layer of mayonnaise on the toasted side of each roll. Working with one part at a time, place a toasted bun on each part and use a spoon to scrape the cheesy beef into the bun as you turn it. Her feet are warm.
Notes
For easier slicing, cover the steaks and freeze for 30-40 minutes (freeze a thicker steak for 40 minutes and a thinner steak for 30 minutes).