If your Squarespace site uses AWS Route 53 for DNS and AWS CloudFront as Content Delivery, use this help article to apply restrictions using Whitelist or Blacklist.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/georestrictions.html