The photon content of proton in the CT18 global analysis