Its’ best to do this first because it takes time for the domain to propagate and this can happen in the background while you are setting up your VPS.
Log into your domain registrar such as namecheap.com or godaddy.com.
Click on the domain name and select the option “Nameserver Registration”. Against ns1.domain.com and ns2.domain.com, enter the IP address(s) provided by the VPS host (see image)
Now wait for the propagation of the domain to take place.
Note that the domain will not point to your VPS server till you program the VPS (shown seperately).