Context. The chemical composition of protoplanetary disks is expected to impact the composition of the forming planets. Characterizing the diversity of chemical composition in disks and the physicochemical factors that lead to this diversity is consequently of high interest. Aims. The aim of this study is to investigate the chemical evolution from the prestellar phase to the formation of the disk, and to determine the impact that the chemical composition of the cold and dense core has on the final composition of the disk. Methods. We performed 3D nonideal magneto-hydrodynamic (MHD) simulations of a dense core collapse using the adaptive-meshrefinement RAMSES code. For each particle ending in the young rotationally supported disk, we ran chemical simulations with the three-phase gas-grain chemistry code Nautilus. Two different sets of initial abundances, which are characteristic of cold cores, were considered. The final distributions of the abundances of common species were compared to each other, as well as with the initial abundances of the cold core. Results. We find that the spatial distributions of molecules reflect their sensitivity to the temperature distribution. The main carriers of the chemical elements in the disk are usually the same as the ones in the cold core, except for the S-bearing species, where HS is replaced by H 2 S 3 , and the P-bearing species, where atomic P leads to the formation of PO, PN, HCP, and CP. However, the abundances of less abundant species change over time. This is especially the case for "large" complex organic molecules (COMs) such as CH 3 CHO, CH 3 NH 2 , CH 3 OCH 3 , and HCOOCH 3 which see their abundances significantly increase during the collapse. These COMs often present similar abundances in the disk despite significantly different abundances in the cold core. In contrast, the abundances of many radicals decrease with time. A significant number of species still show the same abundances in the cold core and the disk, which indicates efficient formation of these molecules in the cold core. This includes H 2 O, H 2 CO, HNCO, and "small" COMs such as CH 3 OH, CH 3 CN, and NH 2 CHO. We computed the MHD resistivities within the disk for the full gas-grain chemical evolution and find results in qualitative agreement with the literature assuming simpler chemical networks. Conclusions. In conclusion, the chemical content of prestellar cores is expected to affect the chemical composition of disks. The impact is more or less important depending on the type of species. Users of stand-alone chemical models of disks should pay special attention to the initial abundances they choose.