When starting wordpress and uploading a theme this is one of the frequent cases that appear. Namely, the error itself does not say anything about the problem itself, which is why the less experienced simply stay in that place without a way out.
The solution to this problem is more than simple and easy and consists of just a few clicks.
What is causing this error to appear?
The first reason is the upload limit, which is smaller than the theme or plugin you are trying to install.

Another reason is the maximum upload time, ie script execution, which is limited in seconds. It is exceeded in this case if you have slower internet and need more time to upload than allowed.
How is it solved?
Whichever of these two cases is the reason, we will combine the solution into one, which is the change of the PHP INI option in cPanel.
You log into cPanel and find an option MultiPHP INI Editor when you click on that option, something similar to the image below will open.

Now you need the "Select location" option, when you click the "Home directory" and the domain will appear, if you have more than one domain on your hosting account, all of them will appear and you select the domain for which you receive this error.
Now that we have selected the domain we get the options as in the image below.

Before the change, a note follows:
The settings that are put there are really good ones that allow your site to run safely and well. This is very important for you to know. And yes, after you change these parameters and finish the site, it is highly recommended that you return to these settings as shown in the picture in order to maintain a safe and good level.
The themes that are usually bought on themeforest.com are great themes in terms of looks but the vast majority are done with page builders and a good number of plugins which may require you to leave some parameters and you can't get them back as you can see from the image and which you have now. This does not mean that you will have any problem, it's just that the topic is done that way and there is nothing you can do about it. Your site will work fine, but it would work better if it were optimized, and increasing the value means that the site is not really optimized.
The parameters we change?
We set max_execution_time to 90
We set max_input_time to 120
We set upload_max_filesize to 50mb if it is not already
We set post_max_size to 50mb if it is not already
Changed it but still not working?
If this is the case, then we just increase these same parameters even more.
We set max_execution_time to 300
We set max_input_time to 300
We set upload_max_filesize to 100mb if it is not already
We set post_max_size to 100mb if it is not already