Heat vegetable oil in a large skillet or wok over medium-high heat. Add minced garlic and sauté for about 30 seconds until fragrant.
Push the garlic to one side of the skillet and pour in the beaten egg. Scramble the egg until fully cooked, then mix it with the garlic.
Add the cooked chicken, pineapple, peas, and carrots to the skillet. Stir-fry for about 3-4 minutes until heated through.
Add the cooked rice to the skillet, breaking up any clumps. Pour in the soy sauce, oyster sauce (if using), sesame oil, black pepper, and red pepper flakes. Stir everything together and cook for another 3-5 minutes until well combined and heated through.
Remove from heat and stir in the sliced green onions. Serve hot.