Cook spaghetti according to package instructions until al dente; drain and set aside.
In a large skillet, heat olive oil over medium heat.
Add diced onion and sauté until translucent, about 3-4 minutes.
Stir in minced garlic and cook for an additional minute.
Add diced bell pepper and cook until slightly softened.
Pour in diced tomatoes and taco seasoning; stir to combine.
Allow the sauce to simmer for about 5 minutes.
Add corn and black beans to the skillet; mix well.
Toss the cooked spaghetti into the sauce, ensuring it’s well coated.
Season with salt and pepper to taste, and garnish with cilantro.