Checking the result of DNS settings for your domain
dig @8.8.8.8 +trace shreshth.dev
An apex domain is a custom domain without a subdomain, e.g. google.com.
Whereas a subdomain is what you prepend to your domain, e.g. in www.google.com, www is the subdomain
Usually, your apex domain (shreshth.dev) has to point to an IP address and cannot point to another domain address. So in your DNS settings, an A record will have to be pointed to the IP of your hosting provider's load balancer. (TODO: add note about ALIAS records available with some providers)
This site's A name record:
shreshth.dev. 3600 IN A 76.76.21.21
Any other subdomains can point to both IP addresses and non-IP addresses, i.e. other subdomains. cat.example.com can point to www.catexample.com, or to 76.76.21.93.
This site's www subdomain CNAME record
www.shreshth.dev. 3600 IN CNAME next-blog-mu-three.vercel.app.
IN stands for internet
Julia Evans has a good article that helps you understand how a DNS lookup works.