The paper aims to study relation between the distributions of the young stellar objects (YSOs) of different ages and the gas-dust constituents of the S254-S258 star-formation complex. This is necessary to study the time evolution of the YSO distribution with respect to the gas and dust compounds which are responsible for the birth of the young stars. For this purpose we use correlation analysis between different gas, dust and YSOs tracers. We compared the large-scale CO, HCO$^+$, near-IR extinction, and far-IR {it Herschel} maps with the density of YSOs of the different evolutionary Classes. The direct correlation analysis between these maps was used together with the wavelet-based spatial correlation analysis. This analysis reveals a much tighter correlation of the gas-dust tracers with the distribution of Class I YSOs than with that of Class II YSOs. We argue that Class I YSOs which were initially born in the central bright cluster S255-IR (both N and S parts) during their evolution to Class II stage ($sim$2 Myr) had enough time to travel through the whole S254-S258 star-formation region. Given that the region contains several isolated YSO clusters, the evolutionary link between these clusters and the bright central S255-IR (N and S) cluster can be considered. Despite the complexity of the YSO cluster formation in the non-uniform medium, the clusters of Class II YSOs in the S254-258 star-formation region can contain objects born in the different locations of the complex.