Turn on your Instant Pot and set it to saute.
Add olive oil and let it heat for a few seconds.
Put in onion, celery, and carrots. Stir and cook for 2-3 minutes until the onion is soft.
Add minced garlic, salt, pepper, and dried oregano. Cook for 30-60 seconds to toast.
Pour in broth, vinegar, beans, rosemary, and bay leaves. Stir.
Add ½ cup pasta for thin soup or 1 cup for thick soup. Gently stir.
Put diced tomatoes and tomato sauce on top without stirring.
Close the lid, make sure the vent is sealed, and set it to cook on high pressure for 2 minutes.
After cooking, let the pressure release naturally for 10 minutes, then do a quick release.
Carefully open the lid, remove bay leaves and rosemary, and stir.
Serve with lots of parmesan cheese and parsley if you like.