This is an amazing fact that the tomatoes are really fruits, not vegetables. The true fruits are developed from the ovary in the base of the flower which contain the seeds of the plant. Some plants have a soft part which supports the seeds and is also called a fruit though it is not developed from the ovary the strawberry is an example.
A tomato is technically the fruit of the tomato plant because its used in savoury rather than sweet cooking & the term ‘vegetable’ is more generally used of other edible parts of plants.

The tomato is really a fruit, not vegitable