Heat olive oil in a pan then saute the diced onion on high heat until it gets a glassy / translucent look for about 3-5 minutes.
Add the crushed garlic and saute until it gets fragrant for about a minute.
Mix in the pureed tomato.
Add the optional capers and olives.
Stir everything together nicely then place a lid halfway on pan and cook the sauce until its water content is somewhat reduced, for about 20 - 3o minutes.
10 minutes before finishing, stir in basil and oregano. With aromatic herbs -especially fresh ones- it is recommended to wait until the end so the dish can keep their scent.