First come, first serve. You are correct that the miners do not enforce it. The protocol establishes that the first to publish the claim is the recognized.
Some people won’t like that, but Inscriptions, BRC-20 and others have shown the power of network effects and social consensus, even without a blockchain to enforce the rules.
One interesting and positive side effect of this is the potential for the protocol the ability to include exceptions. For instance, one possible future extension to the protocol I have considered is the ability for an indexer to subscribe to lists of scammers and squatters in order to ignore illegitimate claims.
Let’s say that someone squats on Amazon, or uses registers amaz0n in order to trick people. People running indexers (for themselves or for the public) could subscribe to Nostr events from trusted individuals or organizations who maintain lists of “scammers and spammers” whose claims can be safely ignored by indexers. The real possibility of having their claims ignored, plus the very real cost of mining a transaction to claim a name, might provide a very simple, neat and decentralized deterrent for scammers and squatters.