Get your taxes done using TurboTax

It sounds like you probably pass the substantial presence test for 2021.  Did you file a 2021 tax return?

 

For 2022 (and assuming no complications that I don't know about), it sounds like you would file federal and state returns showing zero taxable income, zero tax owed, and claiming a refund of the withholding.  For federal, you would file a 1040-NR, Turbotax does not support this.  You will need to find a different software provider.

 

What state was withholding taxes?  If you worked in one of the states that applies a convenience of the employer rule, you might have an issue depending on why you moved.

https://ttlc.intuit.com/turbotax-support/en-us/help-article/form-w-2/employer-withholding-state-taxe...

 

As far as I know, you don't get the social security and medicare tax back, but you may be able to claim a benefit when you reach retirement age.

 

@pk