Bring a large pot of salted water to a boil. Add spaghetti and cook according to package instructions until al dente. Reserve 1 cup of pasta water, then drain and set aside.
In a large deep skillet or saucepan, heat olive oil over medium heat. Add sliced garlic and cook until just golden and fragrant. Be careful not to burn it.
Add the cherry tomatoes to the pan and cook for 3β4 minutes until they begin to soften and burst. Then add the canned chopped tomatoes. Stir well and let simmer for 10β15 minutes, stirring occasionally, until the sauce thickens slightly. Season the sauce with salt and pepper to taste. Stir in chopped basil and let simmer for another 2β3 minutes.
Add the drained spaghetti to the sauce. Toss everything together, adding a bit of reserved pasta water if the sauce needs loosening.
Turn off the heat and fold in the grated parmesan cheese until melted and creamy. Adjust seasoning if needed.
Plate the pasta hot, topped with extra basil or parmesan if desired. For heat add chilli flakes and/or chilli oil.