Herkomst is more of where or under which circumstances something or someone came about/formed/grew up, while 'ontstaan' is more of how or when something comes about. 'Oorsprong' is more of a general translation of 'origin' which can be used interchangeably, especially with 'herkomst', but also 'bron' (which is implies more causality between the origin and the current situation).
Examples:
The Origin of Species - Het Ontstaan der Soorten
Country of origin - Land van herkomst/oorsprong
Point (0,0) is called the origin - Punt (0,0) wordt de oorsprong genoemd
Pandora's box was the source of all evil - De doos van Pandora was de bron/de oorsprong van al het kwaad