Understanding PDF uncertainty on the W boson mass measurements in CT18 global analysis