When connecting your domain, it can take up to 24 hours for the DNS changes to appear publicly. Meaning that if you just recently change the "A" record and "Cname" record and you're getting an error in Shopify then you will want to wait until the 24 hours have passed. If after the 24 hours passes and you're unable to connect the domain then you'll want to use a free tool such as MX Toolbox to determine if the records are public. If they are not, then you'll want to check your domain manager to ensure you've entered 18.104.22.168 for the "A" record of your root domain, and shops.myshopify.com for the "Cname" record of your subdomain. If they are set up correctly, then you'll want to reach out to your domain manager for further troubleshooting steps to determine why the records are not appearing publicly.
If you're still having issues connecting your domain, or if you have any questions, please let me know!
If you have updated your DNS settings and waited 24 hours but are unable to connect your domain to your Shopify store, then you'll need to reach out to your domain provider to troubleshoot it further.