Aims. The initial stages of planet formation may start concurrently with the formation of a gas-dust protoplanetary disk. This makes the study of the earliest stages of protoplanetary disk formation crucially important. Here we focus on dust growth and pebble formation in a protoplanetary disk that is still accreting from a parental cloud core. Methods. We have developed an original three-dimensional numerical hydrodynamics code, which computes the collapse of rotating clouds and disk formation on nested meshes using a novel hybrid Coarray Fortran-OpenMP approach for distributed and shared memory parallelization. Dust dynamics and growth are also included in the simulations. Results. We found that the dust growth from ~1 µm to 1–10 mm already occurs in the initial few thousand years of disk evolution but the Stokes number hardly exceeds 0.1 because of higher disk densities and temperatures compared to the minimum mass Solar nebular. The ratio of the dust-to-gas vertical scale heights remains rather modest, 0.2–0.5, which may be explained by the perturbing action of spiral arms that develop in the disk soon after its formation. The dust-to-gas mass ratio in the disk midplane is highly nonhomogeneous throughout the disk extent and is in general enhanced by a factor of several compared to the fiducial 1:100 value. Low St hinders strong dust accumulation in the spiral arms compared to the rest of the disk and the nonsteady nature of the spirals is also an obstacle. The spatial distribution of pebbles in the disk midplane exhibits a highly nonhomogeneous and patchy character. The total mass of pebbles in the disk increases with time and reaches a few tens of Earth masses after a few tens of thousand years of disk evolution. Conclusions. We found that protoplanetary disks with an age ≤20 kyr can possess notable amounts of pebbles and feature dust-togas density enhancements in the disk midplane. Hence, these young disks can already be ripe for the planet formation process to start. Multidimensional numerical models of disk formation that consider the coevolution of gas and dust including dust growth are important to improve our understanding of planet formation.