Foreign income and tax in foreign country

Hi, I'm a Norwegian citizen living in USA. I got my green card March this year and planning to file jointly with my spouse (US citizen) for 2022.

I'm working 100% remotely for a company in Norway, and at the moment all my taxes and social security is being paid to Norway as well.

There is a tax treaty between USA and Norway, and I believe all my income for 2022 should be taxed to USA, as well as social security.

 

Would TurboTax be able to calculate what I need to pay to IRS and Social security (+ state tax if applicable)?

And is it when filing the 2022 tax return this should be paid? I also believe I need form 8802 from IRS to determine my US residency that I can provide to the Norwegian tax authorities (so I can claim my tax refunded from Norway and pay to the US instead).

 

From January 2023 I plan to start as self-employed instead. From what I've read this seems to be the easiest solution for those who work remotely for a foreign company.