Add wine and cook, stirring often, until the smell of the alcohol is almost completely gone, about 4 minutes. Add tomato paste and cook, stirring occasionally, until slightly darkened in color and starts sticking to bottom of pan, about 4 minutes. Cook, stirring often, until fragrant and garlic is softened, about 2 minutes. Add garlic and red pepper flakes and season with salt. Cook onion, stirring occasionally, until golden and softened, 8–10 minutes. Heat oil in a large heavy pot over medium.