The long-awaited decision follows a standoff with Meta, and succeeds a world-first law from 2021.