Rinse the rice under cold water until the water runs clear to remove excess starch.
In a large pot, heat the olive oil over medium heat. Add the diced onion and sauté for about 5 minutes until softened.
Add the minced garlic, ground cumin, and chili powder. Stir and cook for another minute until fragrant.
Add the rinsed rice to the pot, stirring to coat the grains with the onion and spices. Cook for an additional 2 minutes, stirring frequently.
Pour in the water and add salt to taste. Bring the mixture to a boil.
Once boiling, reduce the heat to low, cover the pot, and let it simmer for 18-20 minutes until the rice is cooked and the water has been absorbed.
In the last few minutes of cooking, add the drained black beans to the pot, stirring gently to combine and heat through.
Once done, remove from heat and let it sit covered for about 5 minutes. Fluff the rice and beans with a fork before serving.
Serve hot, garnished with fresh cilantro if desired.