Heat oil in a large skillet or wok over medium-high heat until shimmering.
Add chopped onion and cook until softened, then stir in minced garlic and cook for about 30 seconds until fragrant.
Add diced carrots and other firm vegetables; stir-fry for 3 to 4 minutes until they start to soften.
Add peas and any remaining vegetables, cooking until they are tender-crisp.
Push vegetables to the side and add cooked rice, breaking up any clumps with a spoon or spatula.
Drizzle soy sauce over rice and vegetables, add sesame oil if using, then stir everything until well combined and heated through.
Season with salt and black pepper to taste.
If using eggs, push rice and vegetables aside, pour beaten eggs into the open space, scramble until just cooked, then mix with rice.
Remove from heat and garnish with sliced green onions or sesame seeds before serving hot.