I assume you already have a Domain and Web Hosting.
1. Get your Web Host’s Nameservers:
When you signed up with any web host, they will send you a welcome mail with all the details of your hosting accounts in which you will see nameservers.
The nameservers will often looks like ns1.example.com, ns2.example.com, and so on.
Also Read: Tips to Secure WordPress Website
2. Enter the Nameservers at your Domain Registrar:
Domain Registrar: The company from which you have purchased a domain name.
Find a way to list the domain at your domain registrar’s site and go to the DNS setting for that domain. Many registrars have a “DNS” or “DNS Management” button, or a “nameserver” button. If you see a link or button like this, it is probably the one you should click.
Copy the nameservers from webhost’s welcome mail and paste them in the nameservers field then save the changes. Once you have set your nameservers, you are done.
Keep a note, it will take 24-48 hours to propagate this changes globally.