Domain names are associated with the correct DNS records by setting the domain name's name servers.
After a domain name is typed into a browser, the computer first retrieves the name servers that correspond to that domain name. The name servers are important because they're responsible with providing the computer with other important information (in the form of DNS records) associated with the domain name.
Setting your domain's name servers is important. The DNS is a global system, which means that anyone can create DNS records. We must verify that the DNS records we create were actually created by the owner of the domain name (in this case, you).
By doing this, the owner of a domain name ensures that only they have exclusive control over their domain's DNS records.