Combine onion, carrots, celery, and garlic in a stockpot; add enough water to cover vegetables. Bring mixture to a boil; add oil, bay leaves, salt, and pepper. Reduce heat and simmer vegetables until slightly tender, about 15 minutes.
Stir lentils into soup; simmer until lentils are tender, 30 to 45 minutes. Stir in vinegar. Cool soup slightly before serving.