Heat olive oil over medium heat in a large pot.
Add celery, carrots, and onion to pot and saute until softened, about 10 minutes.
Stir garlic and rosemary into vegetables; cook until fragrant, about 30 seconds.
Mix flour into pot and stir until vegetables are coated.
Add broth and potatoes to vegetables and bring to a boil.
Reduce heat to a simmer and cook until vegetables are tender, about 15 minutes.
Turn off heat and use an immersion blender to puree about half of the vegetables. (If you do not have an immersion blender, remove half of the vegetables from the pot and puree in a blender.)
Reheat soup, if necessary, then stir in heavy cream.
Season to taste with salt and pepper.
Serve soup hot, topped with cheddar cheese and green onions, if desired.