How does 脖 differ from 頸 for "neck"?
Same thing.
There are some regional usage distinctions and that's about it. 脖子 seems to be used more in Northern China and in Taiwan. 颈项 and 颈子 seems to be more prevalent in use in Southern China. Each region may consider the other term overly formal.
They both can refer to the neck of things, i.e.: the neck of a bottle - 酒瓶脖子 | 瓶颈