In a large skillet or saucepan, heat the olive oil over medium heat. Add the chopped onion and sauté for about 3-4 minutes until softened.
Stir in the minced garlic and red pepper flakes, cooking for an additional 1-2 minutes until fragrant.
Add the diced tomatoes (with their juice), vegetable broth, oregano, salt, and black pepper to the skillet. Bring to a boil.
Once boiling, add the spaghetti to the skillet, making sure it is submerged in the liquid. Reduce the heat to medium-low and cover the skillet. Cook for about 10-12 minutes, stirring occasionally, until the pasta is al dente and the liquid has reduced.
Remove the skillet from heat and stir in the grated Parmesan cheese until melted and creamy.
Serve immediately, garnished with fresh basil leaves.