Vegetable is a culinary term and not a botanical one except in the broadest sense when it’s used as an adjective and is largely synonymous with plant or plant-related. So technically, all plant matter is vegetable, and anything considered a fruit botanically would technically be vegetable too. (My understanding is that this use of vegetable is archaic, and is a remnant of older taxonomic systems.) The real confusion arises from fruit being both a culinary and a botanical term. When we use the term vegetable, we’re usually referring to plant matter that’s considered a vegetable in the culinary sense only. The reality is that we call many botanical fruits vegetables for the purpose of cooking. For example, eggplants, which are closely related to tomatoes, are a botanical fruit and a culinary vegetable. Tomatoes not being a culinary fruit isn’t at odds with them being a botanical fruit. Botanists don’t have a list of vegetables the same way cooks have a list of vegetables. Anyway, don’t worry. Tomatoes can be both without causing the universe to implode. :)