If you use dried beans, soak them according to the method stated above. If you use frozen beans, bring some water to a rolling boil, add some salt and then the beans; cook for about 10 minutes. If you use fresh beans, you do not need any preparation. Just rinse them under cold running water.
Prepare the vegetables: Wash and chop the celery, onion, and carrot very thinly and put them into a pot with a little oil or lard.
Add the whole clove of garlic and fry over medium-high heat until the sautéed vegetables turn golden brown. Remove the garlic and stir in the beans.
Pour in the tomato sauce or paste.
Season with salt and pepper and bay leaves. Cover with a lid and cook for about 15 to 20 minutes.
If it gets too dry, add some water or a little vegetable broth.
Remove a third of the beans; then blend the soup with an immersion blender until creamy.
Add some water or vegetable broth to make it more liquidy.
Bring it to a rolling boil again and add the fresh or dry pasta. Cook the pasta according to the package instructions.
Add the beans you have set aside; season with more salt and pepper.
Garnish with a little oil and dried herbs. Red pepper flakes can be sprinkled on as well.
Serve it very hot with some freshly grated Parmigiano on top.