The ultra-nationalist Vox party gained 24 seats, while the conservative People’s Party lost half of its seats