What products does Spain sell to make money?

Spain exports machinery, motor vehicles, foodstuffs, pharmaceuticals, and medicens according to the CIA Factbook. See https://www.cia.gov/library/publications/the-world-factbook/geos/SP.html.