Beat the eggs until smooth and frothy; set aside.
Heat oil in a large skillet over medium-high heat.
Pour in eggs and softly scramble just set. Slide to a plate.
Add diced Spam to the pan and sear until browned and crispy, 3–4 minutes.
Melt in butter, then stir in garlic and the white parts of the onions.
Add rice and break up clumps. Stir-fry until steaming hot.
Season with soy sauce, sugar, black pepper, and red pepper flakes if using.
Drizzle sesame oil, then fold in scrambled eggs and most onion greens.
Taste and adjust seasoning. Garnish with remaining onion greens and serve hot.