Bring a large pot of salted water to a boil for the ravioli.
While the water heats, warm the olive oil in a large skillet over medium heat. Add the diced onion and cook, stirring occasionally, until softened and translucent, about 3 to 4 minutes.
Stir in the tomato paste and red pepper flakes, if using. Cook for 1 to 2 minutes, stirring constantly, until the paste darkens slightly and smells fragrant.
Pour in the vermouth to deglaze the pan, scraping up any browned bits from the bottom. Let it bubble for about 30 seconds.
While the sauce simmers, cook the ravioli according to package directions. Before draining, reserve about 1 cup (240 ml) of the starchy pasta water.
Reduce the skillet heat to low. Stir the heavy cream, salt, and pepper into the tomato mixture. Add 1/2 cup (120 ml) of the reserved pasta water and stir until the sauce is smooth.
Using a slotted spoon, transfer the cooked ravioli directly into the skillet with the sauce. Gently toss to coat each piece.
If the sauce is too thick, add another splash of pasta water until it reaches your desired consistency. Serve immediately.