If desired, soak dried black beans overnight in a bowl with enough water to cover the beans.
When ready to cook, heat vegetable oil in a soup pot over medium heat. Add onions and cook, stirring, until softened, about 6-8 minutes.
Add garlic, serrano pepers, chili powder, cumin, oregano, and salt and cook for another minute. Drain the beans, if soaked, and add to the pot along with the vegetable (or other) stock or water.
Bring to a boil, then reduce the heat and simmer, partially covered, until the beans are completely tender, about 1 hour 15 minutes for soaked beans and 2 hours for unsoaked. Scoop 2 cups of beans into a small bowl or food processor and mash or process. Stir back into the soup and simmer for 5 minutes more to thicken.
Taste the soup and season with more salt if needed. Serve in soup bowls with your choice of toppings.