Properly wash the rice under running water until the water runs CLEAR to get rid of the starch, and then soak it in cold water for 15 minutes.
Heat the olive oil on medium heat in a pot, when the oil is hot (but not smoking!) saute the diced onion until soft and translucent. Then add the garlic and cook for a minute.
Add the rinsed, soaked, and drained rice, salt, and turmeric, mix and cover with water. You want the water to cover the rice by ½ inch or 1cm. Add the bay leaves if using.
Bring the water to a boil, then lower the heat down to the lowest setting possible, cover with the lid and set your timer to "10 minutes".
After 10 minutes, remove the pot from heat but don't remove the lid. Leave the pot undisturbed for 10 minutes. Remove the lid, and fluff the rice with a fork.
Instant Pot Method
Rinse the rice very well under running water until it runs clear. No need to presoak the rice here.
Press on the SAUTE button, and add the olive oil. When the oil is hot (but not smoking!), saute the diced onion until soft and translucent. Then add the garlic and cook for a minute.
Add the rice and turmeric, season with salt and cover with water so that it covers the rice by ½ inch. Add the bay leaves if using.Secure the lid and set the vent to SEALING. Select the PRESSURE COOK/MANUAL setting and set the cooking time for 4 minutes at high pressure.
The Instant Pot will come to pressure and start cooking. When the cooking program ends, allow the steam to be naturally released for 10 minutes then release the rest of the steam. Remove the lid and fluff with a fork before serving.