There has been a crash on a major road in North Yorkshire.