Heat the olive oil in a medium saucepan over medium heat.
1 tbsp olive oil
Add the onion and cook for 4–5 minutes, stirring often, until softened and translucent.
1 small onion
Stir in the garlic and grated carrot. Cook for another 2 minutes, until fragrant.
2 cloves garlic, ½ medium carrot
Add the tomato paste and cook for 1–2 minutes to deepen its flavor.
2 tbsp tomato paste
Pour in the canned tomatoes. If using whole tomatoes, crush them gently with a spoon or break them apart before adding.
28 oz tomato
Stir in the dried oregano, dried basil, red pepper flakes (if using), and rosemary.
1 tsp oregano, ½ tsp basil, ¼ tsp crushed red pepper flakes, ¼ tsp rosemary
Bring to a gentle simmer. Reduce the heat to low and let it simmer uncovered for 20–25 minutes, stirring occasionally.
Stir in the chopped fresh basil and vinegar. Season with salt and black pepper.
¼ cup basil, ½ tsp balsamic vinegar, ⅛ tsp salt, ⅛ tsp pepper
Use as desired, or let cool and store in the fridge for up to 5 days or freeze for longer storage.