I wondered that too. Here's some googling:
https://now.northropgrumman.com/can-...rs-land-owner/
This seems like the relevant parts:
How Valid Is a Mars Land Deed?
Like all real estate transactions, it comes down to the law. The foundational law for space was drafted 50 years ago, when space exploration was still in its infancy. In 1967, the United States, the then–Soviet Union and the United Kingdom wrote the “Treaty on Principles Governing the Activities of States in the Exploration and Use of Outer Space, including the Moon and Other Celestial Bodies.” Nicknamed the “Outer Space Treaty,” the document established guidelines to ensure equal and peaceful access to space. More than 100 nations signed it. It accounts for real estate in space, among other things. Article II of the Outer Space Treaty states, “Outer space, including the moon and other celestial bodies, is not subject to national appropriation by claim of sovereignty, by means of use or occupation, or by any other means.” In short, nobody can claim ownership of Mars or land on Mars, or do so with any other celestial body.
But the treaty was made to be modified as society advanced. In 2015, the United States Congress passed the Spurring Private Aerospace Competitiveness and Entrepreneurship Act of 2015, or SPACE Act, which allows U.S. citizens to “possess, own, transport, use and sell” materials extracted from celestial bodies, reported Nature. The new law accounts for the growing interest in mining asteroids, the moon or other celestial bodies for minerals or other resources. Private companies will be able to set up shop on Mars, mine it and lay claim to those resources, but won’t be able to own the land.
For those who really want a Mars land deed with their name on it, there’s nothing wrong with buying one. It’s a novelty item that might make a nice gift for the person who has everything. But it’s just for fun. The document won’t be recognized by any government authority as legitimate or legally binding.