Two types of charge order with distinct interplay with superconductivity in the kagome material CsV3Sb5