Tourism is a drop in the water compared to mass immigration. Catalonia, and Barcelona metro in particular, had a flux of African immigrants who in turn have families with 6 to 10 kids. And insignificant new housing. But they choose to bother tourists because it's cool. https://www.epdata.es/evolucion-emigracion-inmigracion-comun...
"The most-visited region of Spain was Catalonia, with 18 million foreign visitors. Barcelona is the capital of Catalonia." "The coastal city alone, with its many internationally famous sites such as La Sagrada Familia, received more than 12 million tourists last year." https://www.abc.net.au/news/2024-07-09/why-are-people-protes...
40K net immigration/year is much smaller than 18 million.
Even if those 18 million are in Catalonia for only a day, that's still 49K people.