If WordPress or other scripts are installed on HTTP or if the database has HTTP, it will load like this – http://your-domain.com can be redirected to https if you want – https://your-domain.com
In that case, follow the below procedure
cPanel > Domain > redirect HTTPS. Turn on this option.
If there is no option here, To force your site to work over SSL, you can use a rewrite rule-
cPanel > File Manager > Click on the directory or folder where your website is located > You will see the file named .htaccess > Right-click on it and click on Edit > Then save the following code anywhere:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"
The website will redirect from HTTP to HTTPS.