They’re both. The term vegetable can mean either a part of a plant that people eat, or in a culinary sense it can refer to savory plant based foods that excludes things like grains, legumes, nuts, etc. In either case tomatoes, being both an edible part of a plant and savory gets to be a vegetable.
On a different level, botanically, not only is it a fruit, but it is a true berry.
So yeah, it can be, and is both things depending on the how you’re looking at it.
Removed by mod