Other commenter got it wrong. There are multiple dialects/languages (eg Gallego, Catalan) spoken in Spain that aren’t really common in the new world, the new world dialects are mostly based on the Castilian (castellano) dialect which was and is the prestige/official Spanish dialect promoted by the government and which settlers likely had in common.
In other words, “Español”could be thought of as a group of Spanish languages with “Castellano” being a distinct language within that group.
In other words, “Español”could be thought of as a group of Spanish languages with “Castellano” being a distinct language within that group.