For security purposes and to enable some functionality, your site needs to have a single primary base url. For example https://site.com, however users might try to access the site via different versions, for example https://www.site.com or http://site.com. It is recommended to redirect other versions of your site url to the primary version via cpanel or another control panel your hosting might be using.
Primary site url can be changed by modifying .env file with any text editor. Make sure DNS records for this url are pointed to your server, otherwise the site will stop working.
This can usually be done from your hosting's control panel.