Drain and rinse the canned beans thoroughly under cold water to remove excess sodium. Dice the yellow onion into 1/2-inch pieces and mince the garlic cloves. Have all ingredients prepped and within arm's reach before you begin cooking, as the aromatics cook quickly. Heat the extra virgin olive oil in a large pot over medium heat until it shimmers, then add the diced onion. Cook for 3-5 minutes, stirring occasionally, until the onion becomes soft and translucent—this develops a sweet, mellow flavor base for the entire soup.
Add the minced garlic and red pepper flakes to the softened onion and stir constantly for about 1 minute. This brief cooking time allows the garlic to become fragrant without burning, and the heat awakens the spice in the red pepper flakes, infusing the oil with deep, complex flavors. I find this step crucial—don't skip it or let the garlic cook too long, or it will taste bitter instead of sweet.
Pour in the vegetable broth and add the canned diced tomatoes (with their juices), the drained and rinsed beans from Step 1, fresh rosemary sprigs, Parmesan rind, kosher salt, and cracked black pepper. Stir everything together, then bring the soup to a boil over medium-high heat. Once boiling, reduce the heat to low and simmer gently for 10 minutes. The Parmesan rind melts slightly and adds a subtle umami depth to the broth—I always use it instead of discarding it, and you'll taste the difference.
Remove the pot from heat and discard the rosemary sprigs and Parmesan rind. Stir in the baby spinach and let it wilt for 1-2 minutes, which should happen naturally from the residual heat of the soup. Finally, squeeze in the fresh lemon juice and taste the soup for seasoning, adjusting salt and pepper as needed. The lemon juice adds a bright, fresh finish that balances the earthiness of the beans and the richness of the Parmesan.
Ladle the hot soup into bowls and top each serving with a generous sprinkle of freshly grated Parmesan cheese. Drizzle with a little extra virgin olive oil if desired for extra richness.