It's magic -> religion -> science and it was coined by Frazer. According to him people went from believing they can personally impact the world through magic, then to believing there are external entities controlling the world around them and finally to scientific understanding. 