If you are filing Married Filing Separate, the IRS requires that you enter your spouse's Social Security number on your return.
If you filed a joint return with her in the past, you will see her SS number on the return
Tax return transcripts include most line items from the originally-filed Form 1040, 1040A, or 1040-EZ return. They're available back to 2013.
Order your transcript online or by mail from the IRS Get Transcript website or by calling their toll-free number 1-800-908-9946.
https://ttlc.intuit.com/questions/1901218-can-i-get-a-copy-of-my-tax-return-from-the-irs
If
you are unable to look up your spouse’s
Social Security number on a prior year return, you will need to file a paper
return, and write in Unknown in her Social Security number field on the
top right of the tax form.
You
should also attach a short note explaining why her social security number is
unknown.