It depends. Sibling thread has some horror stories about Germany, for example.
Estonia has been trying to get foreigners to open their businesses there for a while now: https://e-estonia.com/ But I don’t think that helps US residents too much (ask your tax advisor about CFC rules; I have only a vague understanding that it’s a PITA).
It also mostly doesn't help EU residents. If you live in another EU country, your tax office will treat your Estonian company as a local one since that's where the business takes place in truth.
Estonia has been trying to get foreigners to open their businesses there for a while now: https://e-estonia.com/ But I don’t think that helps US residents too much (ask your tax advisor about CFC rules; I have only a vague understanding that it’s a PITA).