olive oil
2 red or yellow onions, sliced thinly
salt
4 garlic cloves
4 lbs ripe tomatoes, or 2 28oz cans San Marzano or Roma tomatoes
16 basil leaves or 1 tbsp dried oregano
Heat olive oil. Add onions, cook on medium for about 15 minutes until translucent, don't let them burn. Crush or blend tomatoes. Add a little more oil and then garlic to the onion pan, then add tomatoes. Cook on low, stirring every so often to avoid burning, about 25-40 minutes until the tomatoes stop tasting raw/tinny. Then bring to a simmer, add 3/4 cup olive oil, remove from heat. Add pasta to sauce, mix. Thin with pasta water or olive oil as needed.
Source: Salt Fat Acid Heat by Samin Nosrat