Heat 1/4 cup olive oil in a medium pot or Dutch oven over medium heat.
Add the chopped yellow onion and finely grated carrot and cook, stirring occasionally, until softened, about 5–7 minutes.
Add the minced garlic and crushed red pepper flakes and cook until fragrant, about 1 minute.
Stir in the crushed tomatoes and tomato paste until combined.
Add the kosher salt, ground black pepper, dried oregano, and granulated sugar; stir to incorporate.
Bring the sauce to a gentle simmer, then reduce the heat and simmer, uncovered or partially covered, for 20–30 minutes, stirring occasionally; add a splash of water if it becomes too thick.
Taste and adjust seasonings as needed, then stir in the torn fresh basil just before serving.