First of all, some name concepts:
A Name, mapping from alias to IP. For example: sample.com -> 22.214.171.124
CNAME, mappgin from alias to another alias. For example: www -> sample.com
Below is a GoDaddy DNS page. Assume I registered a sample.com dns name.
In the first row, it has type A ‘@‘ name. Put your hosting IP on this row.
Then there is Type CNAME ‘www‘ name. I put value ‘@‘. This means there is a alias www.sample.com which will forward to A name ‘@‘, then to the hosting IP.