If I am understanding correctly, you have a VM in Azure running a web server, and you would like to configure DNS for a website on that web server.
Assuming that your VM & website is not also behind an App Gateway or Load Balancer, you will typically access your website via the Public IP of the VM.
Public IP Addresses typically have a dynamic Public IP address. This means that the IP Address might change if your VM is turned off, or even if Azure experiences an outage. Losing the IP is rare, but it can happen. If this is concerning, you can set the IP to 'Static'.
Public IP Addresses also have a domain label that you can configure on the Public IP. As a best practice, use a CNAME record pointing to the FQDN of the Public IP when setting DNS entries to Public IP addresses.
Now that you have your Public IP ready and a domain label set up, you will need to point your custom DNS to the Public IP of your VM. There are 2 ways to do this:
1) use a CNAME record to point to the FQDN of the Public IP (recommended as a best practice)
2) use an A record to point to the IP Address of the Public IP. (Make sure your IP Address is static)
To Point a custom DNS to your Public IP, you will first need to purchase a domain name. You cannot buy your domain name from Azure, you will need to purchase it from a 3rd party DNS provider (like godaddy, ect). Once you have a domain name, you can configure your records to point to your Azure VM.
To configure the records, you can add / manage the records with your DNS provider, or you can delegate your domain to Azure DNS, to allow you to manage the domain within Azure. Delegating your domain to Azure is not necessary to get your DNS working.
for the full instructions on how to create a CNAME record, look for guidance with your domain provider if you are managing it there, or if you delegated your domain to Azure DNS, you can find the instructions to add a CNAME here.
if you need any additional information, please let me know!