Heat the oil in a large saucepan and fry the onion with a pinch of salt for 10 minutes until translucent. Stir in the garlic and fry for a minute more until fragrant. Stir in the squash pieces, and cover with a lid. Cook for 5-8 minutes until just starting to soften, add the stock and bring to a simmer. Cook for 10-15 minutes, covered, until the squash is tender.