Many countries do offer entrepreneur, self-employment, or startup visa routes, but the bar is set very differently from place to place, and owning a company is almost never automatically a right to live there. The common models: startup visas aimed at innovative ventures, often requiring endorsement by an approved incubator or government body rather than revenue; investor visas keyed to committing a minimum capital amount; and self-employment permits requiring a viable business plan, proof of funds, and sometimes evidence the business serves the local economy.
The thresholds that appear across these programs are minimum investment or capital, job creation for local citizens within a set period, minimum revenue or salary you must pay yourself, and business plan approval. Renewal is where programs bite: plenty of people get the initial visa, then lose status at renewal because the promised jobs or turnover did not materialize.
Also watch the reverse trap: registering a company on a tourist or unrelated visa is usually legal, but working in it without the right status is not. The immigration authority's official site lists the exact criteria for each route, and given how much money rides on this, a consultation with an immigration lawyer in the destination country is money well spent before you commit.