Hmmm….they’re both plants. They both grow 2-3 feet tall. They’re both flowering. They both produce flowers that are considered useful by humans.
Beyond that, I can think of more differences than similarities.
Lavender is a perennial. Broccoli is an annual.
Lavender is grown for it’s beauty and frangrance, broccoli for food.
Lavender has flowers that are light purple (well, lavender-colored), broccoli is yellow flowered.
Lavender is harvested at various degrees of flowering Broccoli is harvested when the flower is still in a tight bud. Once the flowers open, it’s not useful anymore (except to grow seed to save for next year’s crop).