Earlier quoted context omitted.
I think those 24 languages reflect all the languages that are official languages at country level. So for instance, Basque is not an official language of any country (only French in France and Spanish/Castilian in Spain). Belgium's official languages are French, Dutch, and German, "Flemish" is only a local variant of Dutch (Belgian French is also only a local variant of French).
Basque is an official language and declared as such in the Spanish constitution however restricted only to the regions that decide to apply it (Basque Country and Navarra).
Section 3
(1) Castilian is the official Spanish language of the State. All Spaniards have the duty to know it and the right to use it.
(2) The other Spanish languages shall also be official in the respective Autonomous Communities in accordance with their Statutes.
(3) The richness of the different linguistic modalities of Spain is a cultural heritage which shall be specially respected and protected. [1]
[1] https://www.senado.es/web/conocersenado/normas/constitucion/...