Heat olive oil in a 3-quart saucepan over medium heat.
Add onion and garlic; sauté until soft and golden, about 8–10 minutes.
Stir in thyme and grated carrot, cooking for 5 minutes until the carrot softens.
Add tomatoes and their juice, bringing the mixture to a boil while stirring frequently.
Reduce heat to low and simmer for 30 minutes until thickened.
Season with salt. The sauce can be refrigerated for up to 1 week or frozen for up to 6 months.