Heat olive oil in a large skillet (or large sauce pan if making more than one batch) on medium high.
Add onion, if using, and cook until soft, around four minutes, stirring occasionally.
Add garlic to pan and cook for a minute, stirring a couple of times.
Add crushed tomatoes, bay leaf, salt, and pepper flakes; stir.
When sauce starts to boil, lower the temperature and loosely cover the pan with a lid, using a wooden spoon resting on the rim of the pan to keep the lid propped open.
Cook on low, stirring occasionally, for 20-30 minutes. Because the tomatoes you use are a factor, taste along the way to see if any extra salt is needed. If you detect any bitterness, add a little more olive oil.
When the sauce is cooked, add basil leaves and stir in before serving.
Tips for a marinara sauce that's not bitter
Start with good-tasting tomatoes. Use crushed tomatoes from the San Marzano region of Italy, if possible. Tuttorosso tomatoes (affiliate link) also work well.
Use regular olive oil, which has a mild flavor compared to extra-virgin olive oil.
Use fresh garlic cloves without green shoots. The green garlic will be bitter.
Don’t use oregano, which is bitter.
Add a little chopped onion, which provides savory sweetness. This is an optional step, and I sometimes skip it if I'm in a hurry or want a less sweet sauce.
If you still detect some bitterness or acidity in your sauce, try adding a little more olive oil and a bit more salt. Keep in mind that different brands of tomatoes will contain different amounts of salt, so you'll need to season accordingly.
As a last resort, Mom's tip is to add a half teaspoon of baking soda to the sauce to cut down the acidity.
Tips for making more than one batch of sauce
If you are making a larger quantity of sauce, you will need to increase the cooking time. If doubling the quantity, a minimum of 30 minutes is needed for cooking.
For triple and quadruple batches, cook the sauce for an hour.
If making a huge batch for a party, cook it for 90 minutes.
Also, you can just use one bay leaf for up to a triple batch. If you are making quadruple or more, use two bay leaves.