Heat 2 tablespoons of the oil in a 10-inch cast-iron skillet over medium-high. Add onion; cook, stirring occasionally, until softened and beginning to brown, 3 to 4 minutes. Add garlic; cook, stirring constantly, 1 minute. Add tomatoes, 2 tablespoons of the basil, 1 teaspoon of the salt, and 1/2 teaspoon of the pepper; cook, stirring occasionally, until tomatoes burst and release their juices, 6 to 7 minutes. Continue to cook, stirring occasionally, until sauce thickens slightly, 1 to 2 minutes. Transfer to a bowl; cover and keep warm.