To change the folder of an existing add-on domain on cPanel, follow the steps below:
Log in to your cPanel account.
Go to the "Addon Domains" section.
Locate the add-on domain whose folder you want to change and click on the "Edit" button next to it.
In the "Document Root" field, enter the new folder name that you want to assign to the add-on domain.
Click the "Change" button to save the changes.
You will see a message that says "Success: Addon Domain Document Root Changed". This means that the folder for the add-on domain has been successfully changed.
Note: Make sure that the new folder you are assigning to the add-on domain does not already exist in your file manager. If it does, you will need to delete or rename the existing folder before assigning the same name to the add-on domain.