Cook the beans (if using dried). Soak dried kidney beans overnight, rinse and drain.
Add the beans to a pot, add water, and bring to a rolling boil for 10 minutes, then simmer for 45 minutes to 1 hour until completely tender. Drain and set aside. Skip this step if using canned beans.
In a large, heavy-bottomed pot or Dutch oven, heat the vegetable oil over medium heat until shimmering. Add the finely diced onions and cook, stirring occasionally, for 3 to 5 minutes, until golden and soft.
Add the minced garlic and grated ginger to the pot and stir for 1 to 2 minutes until fragrant. The mixture should smell warm and aromatic.
Stir in the ground cumin, coriander, turmeric, and paprika/chili. Cook the spices in the oil for 1 minute, stirring constantly.
Add the finely chopped fresh or canned tomatoes to the pot. Stir well. Cook over medium heat for 5 minutes, stirring occasionally, until the tomatoes have fully broken down and the mixture has thickened into a rich paste.
Add the cooked kidney beans to the pot and stir to coat them thoroughly in the tomato and spice base.
Pour in the full can of coconut milk and about ½ cup of water or vegetable stock. Stir well to combine everything. Bring the stew to a gentle simmer, then reduce the heat to low. Cook uncovered for 10 minutes, stirring occasionally, until the sauce has thickened to your preferred consistency. Add more water or stock if the stew becomes too thick before the beans are fully infused with flavor.
Add salt and pepper to taste and adjust the seasoning as needed.
Stir in the fresh cilantro and serve hot with ugali, steamed rice, chapati, or warm Mandazi.