Star-forming galaxies are composed of various types of galaxies. However, the luminosity functions at z ≳ 4–5 suggest that most galaxies have a relatively low stellar mass (log Mstar ∼ 10) and a low dust attenuation (AFUV ∼ 1.0). The physical properties of these objects are quite homogeneous. We used an approach where we combined their rest-frame far-infrared and submillimeter emissions and utilized the universe and the redshift as a spectrograph to increase the amount of information in a collective way. From a subsample of 27 ALMA-detected galaxies at z > 4.5, we built an infrared spectral energy distribution composite template. It was used to fit, with CIGALE, the 105 galaxies (detections and upper limits) in the sample from the far-ultraviolet to the far-infrared. The derived physical parameters provide information to decipher the nature of the dust cycle and of the stellar populations in these galaxies. The derived IR composite template is consistent with the galaxies in the studied sample. A delayed star formation history with τmain = 500 Myr is slightly favored by the statistical analysis as compared to a delayed with a final burst or a continuous star formation history. The position of the sample in the star formation rate (SFR) versus Mstar diagram is consistent with previous papers. The redshift evolution of the log Mstar versus AFUV relation is in agreement with an evolution in redshift of this relation. This evolution is necessary to explain the cosmic evolution of the average dust attenuation of galaxies. Evolution is also observed in the Ldust/LFUV (IRX) versus UV slope βFUV diagram: younger galaxies have bluer βFUV. We modeled the shift of galaxies in the IRX versus the βFUV diagram with the mass-weighted age as a free parameter, and we provide an equation to make predictions. The large sample studied in this paper is generally consistent with models that assume rapid dust formation from supernovae and removal of dust by outflows and supernovae blasts. However, we find that high mass dusty star-forming galaxies cannot be explained by the models.