To be able to change the domain name of your WordPress site without any hassle, you can easily do this by using the "Clone" function available in your WordPress manager.
Here's how you do it:
Log in to your cPanel.
Search for "WordPress" in the search field at the top.
Click on WordPress Manager.
Then click on the arrow to the right of your domain name. (Refer to the image)
Scroll down and click on "Clone".
Now, select the new domain name you want for your WordPress site.
Scroll down again and click on "Clone installation".