The question is simple - probably the answer is not: How do remote workers deal with taxes when working for a foreign company?
a) Do you pay taxes in your country or in the company's country?
b) Do you pay taxes as freelancer, 'LLC' or as dependent worker? In my country (Portugal) being a freelancer means paying an huge amount of taxes (~50%) when making more than 25K/y.
(updated)
b) I have set up a LLC. Of course I have to pay a lot of tax. If I want to have 100 dollars deposited to my account I have to charge my client 250 dollars. Still there are several benefits to having an LLC. It enables me to optimise how much I pay in tax, usually I can go from 60% tax to somewhere around 50%. I buy everything related to my business via the business. Conference trips, computers, headsets, screens, books. That way I can spend money "pre-tax", before I lose the 50% by paying it from the LLC as salary. Essentially I get those items for 50% off compared to if I had bought them with my own money. I can also get the VAT back.
When you have an LLC the contract between you and the client will actually be between the LLC and the client. That means you are not personally liable for any damages, for example if you get sick and can't deliver the client can't go after you personally. Also should you for some reason go bankrupt you are (typically) not personally liable.
Note that this is how it works in Sweden, but some of it might be applicable in Portugal.