Context. The intrinsic variability due to the magnetic activity of young active stars is one of the main challenges in detecting and characterising exoplanets. The stellar activity is responsible for jitter effects observed both in photometric and spectroscopic observations that can impact our planetary detection sensitivity. Aims. We present a method able to model the stellar photosphere and its surface inhomogeneities (starspots) in young, active, and fast-rotating stars based on the cross-correlation function (CCF) technique, and we extract information about the spot configuration of the star. Methods. We developed Spot CCF, a tool able to model the deformation of the CCF profile due to the presence of multiple spots on the stellar surface. Within the Global Architecture of Planetary Systems (GAPS) Project at the Telescopio Nazionale Galileo, we analysed more than 300 spectra of the young planet-hosting star V1298 Tau provided by the HARPS-N high-resolution spectrograph. By applying the SpotCCF model to the CCFs, we extracted the spot configuration (latitude, longitude, and projected filling factor) of this star, and provide a new radial velocity (RV) time series for this target. Results. We find that the features identified in the CCF profiles of V1298 Tau are modulated by the stellar rotation, supporting our assumption that they are caused by starspots. The analysis suggests a differential rotation velocity of the star with lower rotation at higher latitudes. Also, we find that SpotCCF provides an improvement in RV extraction, with a significantly lower dispersion with respect to the commonly used pipelines. This allows mitigation of the stellar activity contribution modulated with stellar rotation. A detection sensitivity test, involving the direct injection of a planetary signal into the data, confirms that the SpotCCF model improves the sensitivity and ability to recover planetary signals. Conclusions. Our method enables us to model the stellar photosphere and extract the spot configuration of young, active, and rapidly rotating stars. It also allows the extraction of optimised RV time series, thereby enhancing our detection capabilities for new exoplanets and advancing our understanding of stellar activity.