Place the garlic on a cutting board and rest the flat side of a wide knife over one clove at a time. Whack the side of the knife with your fist to crush the clove so that it breaks open, but remains in one piece. Do the same with the remaining cloves. Set aside.
Heat oil in a 9-inch skillet over medium heat. When the oil is hot enough to slick across the surface of the pan, add the garlic and cook until it's browned and fragrant, 2-3 minutes, flipping occasionally. Remove the garlic with tongs and discard. Sprinkle in the red pepper flakes. Cook for 1-2 minutes in the oil, stirring often.
Remove the pan from the heat and carefully add the tomatoes to the hot oil. The oil and tomatoes will splatter, so an apron would be advisable. Break the tomatoes apart with the back of a wooden spoon. Add the basil leaves and stir to combine. Place the lid askew on the pan so that steam can still escape and cook for 8-10 minutes, stirring occasionally. Remove from heat and use the tongs to remove the basil and discard.
Transfer the tomatoes to a food processor. Add the salt. Secure the lid on the food processor and place a dish towel over the top (to catch any splatters -- yes, I've had it happen to me). Pulse the tomato sauce 5-6 times until the sauce is smooth. Check for seasoning, adding additional salt if needed. Don't add the black pepper until you are finished processing the sauce, otherwise it will be spicier than you intended.