Heat the olive oil in a large saucepan over medium heat. Add the diced onion and stir to coat in the oil. Cook for 2 to 3 minutes until the onions are just translucent.
Add the minced garlic and cook for an additional minute until fragrant.
Stir in the cumin, chili powder, and cayenne pepper (if using). Cook for another minute to toast the spices and release their flavors.
Add the vegetable stock, pinto beans, and fire-roasted tomatoes to the saucepan. Bring the mixture to a boil, then reduce the heat to low. Simmer uncovered for 15 to 20 minutes, allowing the flavors to blend together.
Remove the saucepan from the heat. For a smoother, thicker soup, use an immersion blender to blend the soup in the pot until it reaches your desired consistency. If you don’t have an immersion blender, you can transfer the soup in batches to a standard blender.
Season the soup with salt and pepper to taste. Once blended (or left chunky), portion the soup into bowls. Top with your favorite garnishes like cilantro, lime juice, diced tomatoes, and chopped scallions. Serve warm and enjoy!