Cook the spaghetti in salted water according to the instructions on the packet. About 5 minutes before the pasta is ready, fry the onions and garlic in a pan in a little oil. As soon as the onions are translucent, add the chopped tomatoes and some sun-dried tomatoes with 3-4 teaspoons of the oil.
Fry the whole thing for another 3 minutes and then add the cooked (not quenched) pasta, as well as some basil and the finely chopped buffalo mozzarella.
Season everything with salt, pepper and balsamic vinegar and serve as soon as the mozzarella strings and garnish with a little basil if necessary.