A busy road in North Yorkshire is set to be closed for a number of hours due to a serious crash.