We analysed the open clusters Czernik 2 and NGC 7654 using CCD UBV photometric and Gaia Early Data Release 3 (EDR3) photometric and astrometric data. Structural parameters of the two clusters were derived, including the physical sizes of Czernik 2 being r=5 and NGC 7654 as 8 min. We calculated membership probabilities of stars based on their proper motion components as released in the Gaia EDR3. To identify member stars of the clusters, we used these membership probabilities taking into account location and the impact of binarity on main-sequence stars. We used membership probabilities higher than $P=0.5$ to identify 28 member stars for Czernik 2 and 369 for NGC 7654. We estimated colour-excesses and metallicities separately using two-colour diagrams to derive homogeneously determined parameters. The derived $E(B-V)$ colour excess is 0.46(0.02) mag for Czernik 2 and 0.57(0.04) mag for NGC 7654. Metallicities were obtained for the first time for both clusters, -0.08(0.02) dex for Czernik 2 and -0.05(0.01) dex for NGC 7654. Keeping the reddening and metallicity as constant quantities, we fitted PARSEC models using colour-magnitude diagrams, resulting in estimated distance moduli and ages of the two clusters. We obtained the distance modulus for Czernik 2 as 12.80(0.07) mag and for NGC 7654 as 13.20(0.16) mag, which coincide with ages of 1.2(0.2) Gyr and 120(20) Myr, respectively. The distances to the clusters were calculated using the Gaia EDR3 trigonometric parallaxes and compared with the literature. We found good agreement between the distances obtained in this study and the literature. Present day mass function slopes for both clusters are comparable with the value of Salpeter (1955), being X=-1.37(0.24) for Czernik 2 and X=-1.39(0.19) for NGC 7654.