Heat oil in a large Dutch oven or other heavy pot over medium. Add onion and cook, stirring often, until softened but not browned, about 10 minutes. (You should lower the temperature if the onions start to brown faster than becoming translucent.)
Once the onions are soft, add the garlic and sauté for one minute.
Add tomato paste and red pepper flakes and cook, stirring, until paste is slightly darkened in color (it should start to fry in the oil), about 1 minute.
Add tomato purée, salt, and sugar, and bring to a simmer. Partially cover pot with a lid (to avoid splattering), reduce heat so sauce is at a very low simmer, and cook, stirring occasionally, until slightly thickened, 40–50 minutes.