Heat oil in a pan over medium heat.
Add the chopped onion, cook it for 2–3 minutes, and stir occasionally, until it softens.
Add the black beans, diced tomatoes with their juice, and the frozen corn. Stir everything together.
Sprinkle in the chili flakes, garlic powder, and some salt. Mix well and let it cook for about 5–7 minutes. The mixture should thicken a little as it cooks.
Add the cooked rice and gently stir until everything is evenly combined. Let it cook for another 2–3 minutes so the rice heats through.
Taste and adjust salt if needed. Turn off the heat and serve warm.