You can obtain citizenship of almost any country in the world by legally residing there for a specified period under the law. Initially, you obtain a residence permit (permanent or temporary) based on various grounds such as education, work, investment, etc. After several years of continuous residence, which can range from 2 to 5 years or more depending on the country, you can apply for permanent residency and eventually citizenship. By this time, you are likely to have integrated successfully into the country, learned the language, and paid sufficient taxes to become a full-fledged citizen.
Naturalization is a wonderful organic way to obtain citizenship, but it is the longest and not free, as it may initially seem. If we consider European countries, almost all of them impose high income taxes on citizens, including on global income.
It's not difficult to calculate the cost of French citizenship: you can obtain this country's passport after 5 years of permanent residency status and tax payments. France applies a progressive household income tax rate, so if you and your spouse earn over 160,000 euros annually, your income is taxed at 45%. Over 5 years, this accumulates to 360,000 euros in taxes — that's the price of citizenship for a family of two people with a combined global income of just 160,000 euros per year.