Heat the oil in a large skillet over medium heat.
Once shimmering, add the chopped onion and cook, stirring occasionally, until soft and golden brown, about 10 minutes.
Stir in the ground cumin and cook for 1 minute more until it's fragrant. This step toasts the spice and deepens its flavor.
Add the cooked beans to the skillet.
Using a potato masher or the back of a large fork, begin to mash the beans directly in the pan.
Continue to cook and mash, stirring frequently, until the beans are mostly broken down. If they seem too thick, add a splash of the reserved bean cooking liquid or water to reach your desired consistency.
Season generously with salt, pepper, and the cayenne.
Taste and adjust the seasonings as needed—you might want another pinch of cumin or a dash more cayenne for extra heat.
Serve immediately.
Don't be afraid to leave some beans partially whole when mashing. This creates a wonderful, rustic texture that's far superior to a completely smooth purée.