Heat butter or oil in a large skillet over medium heat. Add diced potatoes and cook until golden and crispy, stirring occasionally.
Stir in the chopped onion and diced ham. Cook for 2-3 minutes until the onion softens and the ham is slightly crispy.
Crack the eggs directly into the skillet, season with salt and pepper, and stir gently to scramble them with the potatoes. Cook until the eggs are set but still soft.
Sprinkle shredded cheddar cheese over the top, cover the skillet for 1-2 minutes until the cheese melts.
Serve hot and enjoy this delicious, cheesy, and satisfying dish!