Heat vegetable oil in a large skillet or wok over medium-high heat. Add garlic and ginger, sauté for about 30 seconds until fragrant.
Add the diced chicken and cook for 2-3 minutes until heated through.
Stir in the frozen peas and carrots, cooking for another 2 minutes until they are tender.
Push the chicken and vegetables to one side of the skillet. Pour the beaten egg into the empty side and scramble until fully cooked.
Add the cooked rice, diced pineapple, soy sauce, oyster sauce (if using), and sesame oil. Mix everything together and stir-fry for about 5 minutes, ensuring the rice is heated through and well combined.
Season with salt and pepper to taste. Stir in green onions just before serving.