In a large pot, melt the butter over medium heat. Add the diced onion and sauté for about 5 minutes until translucent. Stir in the minced garlic and cook for an additional minute until fragrant.
Add the broccoli florets and diced carrots to the pot. Pour in the vegetable broth and bring to a boil. Reduce the heat and simmer for 15-20 minutes, or until the vegetables are tender.
Using an immersion blender, blend the soup until smooth. If you prefer a chunkier texture, blend only half of the soup and leave the rest as is.
Stir in the heavy cream, shredded cheddar cheese, salt, black pepper, and cayenne pepper (if using). Cook over low heat, stirring frequently, until the cheese is melted and the soup is heated through.
Remove from heat and stir in the lemon juice. Taste and adjust seasoning if necessary.