The harbour branch left the mainline South of King's Lynn. The docks branch left the mainline close to King's Lynn Station. The post below includes a very short history of the harbour and docks and then covers the length of the branch from the station to John Kennedy Road.
http://rogerfarnworth.com/2018/09/24...-branch-part-1