Parboil diced potatoes for 5–7 minutes until slightly tender, then drain and pat dry.
Heat a cast iron skillet over medium-high heat and add butter or oil.
Add diced potatoes in an even layer and cook undisturbed until golden and crispy on one side.
Stir in chopped onions and cook until softened, about 3–4 minutes.
Add minced garlic and cook for 30 seconds until fragrant.
Fold in diced corned beef and gently press the mixture into the pan.
Cook undisturbed for 4–5 minutes to develop a crispy crust.
Flip sections and continue cooking until heated through and crisp.
Season with pepper and adjust salt if needed.
Serve hot, optionally topped with fried or poached eggs and fresh herbs.