Heat olive oil in a large skillet over medium heat.
Add the chopped onion and sauté until translucent, about 5 minutes.
Stir in the minced garlic and cook for an additional minute until fragrant.
Pour in the crushed tomatoes and stir well to combine.
Add the dried basil, oregano, and red pepper flakes (if using).
Season with salt and pepper to taste.
Bring the sauce to a simmer and reduce heat to low.
Let the sauce simmer for about 20 minutes, stirring occasionally.
Taste and adjust the seasoning if necessary.
Serve hot over cooked ravioli, garnished with fresh basil.