@isaiah122 Disclaimer: I'm not a tax adviser in any way. What I say is just based on what I remember from when I did my investigation.
You are going to be resident somewhere. If you pay yourself as salary 100%, that salary will be taxed in the country you're resident into (nothing to do with Estonia). And some countries will even force your company to register in this country as a branch so that it pays company social security too, since it is employing people in their country.
If you pay yourself as director or dividends, then it's taxed in Estonia 20%, doesn't matter where you're resident.
If you make yourself freelance and invoice your company, basically you pay taxes and social security as freelance in the country you are registered into.
On top of this, any accounting advisor will tell you you shouldn't pay you 100% salary if you're the only employee. They will usually recommend a 80/20 split.
Plus, another thing they won't probably tell you. If your company is in Estonia, it's mandatory your accounting team is a company Estonia. Guess where they make their money. Now you're paying for accounting in Estonia AND where you're resident into.
Those are some key bits I can remember. Might have forgotten or mixed some stuff.