Submerge the rice in a bowl of cool water and squeeze it in your hands to release starch.
Drain and rinse the rice in a fine-mesh strainer under cool water until the water runs clear. Let it drain and dry thoroughly for a few minutes.
Set a wide pot over medium heat and add the olive oil. After 90 seconds, when the oil is hot, add the vermicelli. Stir-fry continuously until the noodles turn deep golden brown.
Add the diced onion and garlic and continue cooking over medium heat for 3 minutes, stirring frequently.
Add the rice to the pot and stir to coat it evenly in the oil. Pour in the vegetable stock or water, then add the salt and black pepper. Bring to a boil over high heat.
Once boiling, cover the pot with a tight-fitting lid, reduce the heat to low, and simmer for 17 minutes without lifting the lid.
After 17 minutes, remove the pot from the heat and let it rest, covered, for 10 minutes. Uncover and gently fluff the rice with a fork.
If using garnishes, top the rice with fried onions, chopped parsley leaves, and mint leaves before serving.