Sofrito is a flavorful base made with sautéed onions, peppers, garlic, and herbs. Adding sofrito to the yellow rice infuses it with a rich and aromatic taste, elevating the overall flavor of the dish.