Context. The cyano radical (CN), one of the first detected interstellar molecular species, is a key molecule in many astrochemical chains. In particular, it is detected towards molecular cores, the birth places of stars, and it is involved in the rich chemistry that takes place at these sites. Aims. At present, there are not many studies on the emission of this molecular species at small spatial scales towards massive young stellar objects. We therefore present a high-angular resolution CN study towards a sample of massive protostars, with the aim of unveiling the spatial distribution at the small scale of the emission of this radical in relation to star-forming processes. Methods. The interstellar CN has a strong emission line at the rest frequency 226 874.764 MHz, thus we searched for observing projects in the Atacama Large Millimeter Array (ALMA) database regarding high-mass star-forming regions observed at Band 6. The used data set was observed in ALMA Cycle 3 with angular and spectral resolutions of 0.′′7 and 1.13 MHz, respectively. A sample of ten high-mass star-forming regions located in the first Galactic quadrant were selected on the basis that they present a clear emission of CN at the mentioned frequency. Results. We found that the CN traces both molecular condensations and the diffuse and extended gas surrounding them. In general, the molecular condensations traced by the maximums of the CN emission do not spatially coincide with the peaks of the continuum emission at 1.3 mm, which trace the molecular cores where massive stars are born. Based on the presence or lack of near-IR emission associated with such cores, we suggest that our sample is composed of sources at different stages of evolution. The CN is present in all sources, suggesting that this radical may be ubiquitous along the different star formation stages, and hence it may be involved in different chemical reactions occurring during the period of star formation. Additionally, other molecules such as CH3OCHO and CH2CHCN were detected towards the continuum peaks of some of the analysed cores. We found that the missing flux coming from extended spatial scales that are filtered out by the interferometer is an important issue to take into account in the analysis of some spectral features and the spatial distribution of the emission.