AFAIK they are not ever unique
> To date, 450+ million SSNs have been issued, but with just under 1 billion possible number combinations, there has never been a need to recycle numbers, and the SSA notes that it does "not reassign a Social Security number (SSN) after the number holder's death."
https://gizmodo.com/what-happens-to-your-social-security-num...
If you have two systems and you want to correlate data between them, you can use something like the SSN to assist in that process, but usually it will need additional information.
Generally you can't use something someone supplies as a shared identifier. You can't start the process of verifying it, after all, without an identifier. You might think of all sorts of ways around this, but they all boil down to either tolerating errors or making the SSN a secondary attribute rather than a bona fide identifier.
https://www.ssa.gov/history/ssn/misused.html
There are actually lots of dummy SSNs that are used by a lot of people (including illegal workers).