Heat the oil in a large saucepan over medium heat until shimmering, about 3 minutes. Add the celery, carrot, and onion and cook, stirring occasionally, until the vegetables have softened, about 10 minutes. Stir in the garlic and cook until fragrant, about 1 minute. Season with several generous pinches of salt and pepper.
Add the broth, tomatoes with their juices, lentils, bay leaf, and thyme and stir to combine. Cover and bring to a simmer, about 15 minutes. Once simmering, reduce the heat to low and continue simmering, covered, until the lentils and vegetables are soft, about 15 minutes more.
Taste and season with more salt or pepper as needed, then stir in the vinegar. Add the spinach and stir until wilted. If you prefer a creamier texture, purée half of the soup in a blender and add it back to the pot.