Chop the onion and garlic.
Heat cooking oil in a pan and sauté the chopped onion and garlic.
Add rice and stir-fry thoroughly.
Season with oyster sauce and soy sauce.
Fry an egg on the side or scramble it together.
Transfer the finished nasi goreng to a bowl.