add the onion to the oil and let it fry until it's brown.
if your rice (medium grain as in the picture) needs soaking or washing, do this while you add water and salt to the fried onions and wait for the water to boil.
once the water boils, add the rice and cover it, don't leave it, remove the lid every now and then and thoroughly stir the rice until it absorbs the water.
all this time your stove should be on the high heat level, now when the rice absorbs the water, you put it on low-medium heat (not too low, you know your stove better than I) and cover it. Let it cook for 20 minutes, then stir it in a way that the bottom part becomes on the top. Taste it, if it's well-cooked, it's done, if not, cover it for 5-10 more minutes. If you feel it's too hard or too dry (some rices need more water) add little water and cover it for 10 more minute.
leave the rice on the stove after the 20 minutes for 3 minutes or so before you serve it. You can turn off the stove meanwhile or keep it on. You should add enough salt to the water and if the amount of oil is too much you can lessen it or increase it. It will taste better if it contains enough oil. Serve it with meat and broth or with chicken and cooked vegetable soup and salad or any other thing for more flavour.