Heat olive oil in a large skillet. Sauté onion and garlic until soft.
Add cherry tomatoes. Let them cook until they burst and release juices.
Season with salt, pepper, and chili flakes if using.
Add dry spaghetti. Pour in just enough water to cover.
Simmer, stirring often, until pasta is cooked and sauce thickens (10–12 mins).
Garnish with basil or your favorite toppings.
