The starting point is Lex Koller and buying property in Switzerland. The rules distinguish between categories of foreign buyer, residence status and the intended use of the property. Buying a home does not itself create Swiss residence rights.
That is why the property decision belongs after the residence route, including residence without employment if you will not work in Switzerland, and alongside the canton comparison. The home can affect tax, wealth-tax valuation, mortgage affordability and, for qualifying lump-sum taxpayers, the expenditure-based tax calculation.
If you are not ready to buy, renting an apartment in Switzerland gets you the home you need in order to register.
Before signing a reservation agreement or purchase commitment in a cross-border case, a Swiss relocation strategy consultation can test the immigration, canton and tax sequence first.