Where you have your company isn't what is most important. If you live in a high tax country and start a company in a tax haven, that won't help you because you will still be taxed fully because of your residency.
You need to obtain tax residency in a low tax country or a country with territorial tax.
Then you can benefit from opening a company in a low/no tax country.
There are many options for this, Belize, Cyprus, Malta, UAE, HK etc etc... which will makes the most sense for you depends on your situation. But you need to move to a low tax country before you can benefit.