Drizzle your oil into a pan and add in your onion and garlic. Fry on medium heat for 5 minutes.
Preheat your oven to 200C/180C fan.
Add in your salt, pepper, tomatoes, balsamic vinegar, and sugar. Cook for 15 minutes stirring frequently.
Pick some fresh basil leaves and toss them into your mixture. Transfer to a small oven-proof dish, tuck in your mozzarella ball, drizzle with a bit more oil, and bake for 10-15 minutes.
Meanwhile, cook your pasta to packet instructions in salted water.
Remove your baked mozzarella from the oven, drain your pasta, mix it all up together, and enjoy!