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