Use day-old, cold rice for the best results. If freshly cooked rice is used, spread it on a tray to cool completely before frying.
Heat 2 tablespoons of vegetable oil in a large skillet or wok over medium-high heat. Add the onion and sauté for 2–3 minutes, until softened. Add the garlic and ginger, stirring frequently for 30 seconds, until fragrant.
Push the aromatics to one side of the skillet. Pour the beaten eggs into the empty side and scramble them until just set. Mix the eggs with the aromatics.
Add the rice to the skillet, breaking up any clumps with a spatula. Stir well to combine with the aromatics and eggs.
Pour in the soy sauce and oyster sauce (if using). Toss the rice to evenly coat it with the sauces. Stir-fry for 3–4 minutes, allowing the rice to absorb the flavors.
Remove the skillet from heat and drizzle with sesame oil (optional). Garnish with sliced green onions and sesame seeds, if desired. Serve hot.