It is important to understand how DNS works before proceeding. When you register a domain, the domain registrar provides you with a control panel called the Domain Control Panel, which is different from cPanel or other web hosting control panels.
Here you can specify the name servers of the domain, renew the domain name, change the contact information of the domain, and do much more. These name servers designated in the domain control panel are the authentic name servers of the domain. In these authoritative name servers, there needs to be a zone file in which the DNS records (like NS, A, CNAME, and TXT records) are added.
For perfect name resolution, the NS records must match the name servers entered in the domain control panel.
Users using our name servers can easily alter the DNS zone file or DNS records in cPanel. For those who are using exterior or any other third-party name servers (e.g., CloudFlare services), you need to update the DNS records or zone file there in their DNS management area.
cPanel → Domains → Zone Editor

To edit a record, perform the following steps:
Click Manage for the domain that you want to modify. A new interface will appear.

Click Edit next to the record or records that you want to edit.

Update the required fields
Note: If you change the record type, cPanel keeps the existing data until you save
Click Save Record or Save All Records to save your changes, or click Cancel.
To add a new DNS record:
Select the domain name from the dropdown list.
Enter the required DNS record details.
Click Add Record.
A Record—Maps a domain to an IPv4 address
AAAA Record – Maps a domain to an IPv6 address
CNAME Record – Creates an alias for another domain
MX Record – Specifies mail servers for email delivery
PTR Record – Resolves an IP address to a hostname (usually managed by the IP owner)
NS Record – Specifies authoritative name servers
SOA Record – Contains administrative information about the DNS zone
SRV Record – Defines services and ports
TXT Record – Stores text data (used for verification, SPF, DKIM, etc.)
Earlier, MX (Mail Exchange) records could not be added or modified through the Advanced DNS Zone Editor and were managed only via MX Entry.
However, in the current versions of cPanel, MX records can be added and edited directly from the Zone Editor.
cPanel → Domains → Zone Editor → + MX Record

To edit a record, perform the following steps:
Click Manage for the domain that you want to modify. A new interface will appear.

Click Edit next to the record or records that you want to edit.

From the Type dropdown, select MX, make the required changes, and then click Save Record.

To add a new MX record:
Select the MX Record.

Enter the required MX record details.

Click Add An MX Record.
select
local Mail Exchanger (if mail server in the same server, default mail servers) or
Remote Mail Exchanger (other mail servers like Google Apps or mandrill) or
Backup Mail Exchanger (set this option if the topmost priority mail server is exterior), depending upon the mail server you are using. If you use our name servers (not mail servers), just leave it as Automatically detect configuration.