Hi Anees,
Sorry I am not very familiar with the cpanel email server.
To my knowledge, you may need to export the emails via cpanel and use some third-party tools to convert the file format (supposed to be MBOX file format) to pst.
Then you may import the pst file to users' mailboxes via Exchange Admin Center or via Outlook.
If you are using the Exchange Admin Center, the account you are using requires to be assigned the "Mailbox Import Export" role.
If the users are using Outlook and imap to connect to cpanel server, I suppose that exporting the emails to pst files via Outlook and importing the pst files to their mailboxes on the Exchange server would also be a solution.
Here are some links on this topic for your reference:
How do I Export All Emails from cPanel Email to Outlook PST format?
(Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.)
Procedures for mailbox imports from .pst files in Exchange Server
Back up your email
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.