In a large pot or Dutch oven, heat the olive oil over medium heat.
Add the chopped onion and minced garlic. Sauté for about 3-4 minutes until the onion is translucent.
Increase the heat to medium-high and add the ground beef. Cook for about 5-7 minutes until browned, breaking it apart with a wooden spoon.
Stir in the diced carrots, celery, and bell pepper, and cook for another 3-4 minutes until they begin to soften.
Add the can of diced tomatoes (with juice), beef broth, green beans, corn, thyme, oregano, salt, and pepper. Stir well to combine.
Bring the mixture to a boil, then reduce the heat and let it simmer for about 20 minutes, stirring occasionally.
If using, add the spinach in the last 5 minutes of cooking and stir until wilted.
Taste and adjust seasoning if necessary before serving.