To configure email sending from your cPanel server to Microsoft 365, you need to follow several steps, including DNS setup and updating the records to ensure emails are correctly handled.

You will need to configure the following DNS records: MX, SPF, DKIM, and CNAME.
MX records direct emails to Microsoft 365 servers.
Priority: 0
Server Name: yourdomain-com.mail.protection.outlook.com
Replace yourdomain-com with your domain name and adjust the format as needed.
The SPF record helps prevent unauthorized parties from sending emails from your domain.
This value specifies that Microsoft 365 is authorized to send emails from your domain.
DKIM authenticates outgoing emails to prevent them from being marked as spam. Microsoft 365 automatically generates DKIM keys, but you must enable it in the Microsoft 365 admin portal.
To allow email applications to automatically configure Microsoft 365 settings, you need to add a CNAME record for Autodiscover.

In summary, the records to configure are:
After configuring the DNS records, wait for a few hours for the changes to propagate. Once active, you can verify the setup in the Microsoft 365 admin portal.