Heat the olive oil in a large skillet over medium heat.
Add the chopped onion and sauté for 5-7 minutes until soft and translucent.
Stir in the garlic and sauté for another 30 seconds until fragrant.
Add the tomatoes with their juice, crushing them with your hands or a spoon.
Season with salt, pepper, oregano, and red pepper flakes if using.
Bring to a simmer and cook uncovered for 20-25 minutes, stirring occasionally.
Stir in the chopped basil before serving.