If you can access your website using your domain without www. (e.g: yoursite.com) but not with www.yoursite.com, then most likely another A record needs to be added in domain’s DNS zone settings.
Goto CPanel > DNS Zone Editor
Create a new A record
Enter valid zone name as “*” and also use as a record of the same IP address from “@” A record or CNAME.
Click on Add Record
Wait for few minutes the change gets validated.