It's possible that the DNS changes made in Squarespace have not propagated yet. This can take up to 24-48 hours.
In the meantime, you can try adding the domain to your server's hosts file to see if it resolves correctly.
To do this, SSH into your server and edit the hosts file:
sudo nano /etc/hosts
Add a new line with your server's IP address followed by your domain name:
PUBLIC_IP yourdomain.com
Save and exit the file.
Then, try accessing your site using the domain name in your browser. If it works, then the issue is likely with DNS propagation and you'll need to wait for it to fully propagate before the domain will work for everyone.