They are freeing up ~10,000 houses over the next four years with this legislation. Barcelona built ~15,000 new properties between 2011 and 2020.
The math don't math. It's a drop in the bucket. The entire impact of AirBnB + all housing built in the last decade does not offset the last half decade of population growth.
Housing must be built more quickly than your population is growing to keep prices down, or you must concede that you live in a nice area where people wealthier than you wish to be and that those people are going to gentrify the area and displace locals. It's an unpleasant reality of the world.
EDIT: some good feedback in the responses. thanks! I'm being a bit dramatic by saying it's just a drop in the bucket, this action frees up more housing than was built over the same timespan, and it's possible to have effects on pricing greater than what would be inferred by the raw numbers because economics is tricky. cheers.
Your retort here simply isn't logical.
10k doesn't fully offset 100k but it's a significant chunk of it, and when supply gets so compressed as to become inelastic, a 10k amelioration (that is also prevented from creeping up to 15k or 20k within a few years) can be quite significant. Plus certain districts are obviously impacted disproportionately compared to others by not just the reduction in housing available but the sheer foot traffic and other blight that comes along with a lopsided rise in tourist accommodations.