Choose the profile that fits you and get the steps in order, from the first document to being legally settled in Mexico City.
For Mexico City
Your situation
Open a step on the roadmap to see what it involves.
Rules change
Almost every residence route starts with a visa from a Mexican consulate abroad; you cannot normally switch from tourist to resident inside Mexico, the family-unity route being the main exception. Consulates set their own appointment systems and apply the financial thresholds differently, so check with yours. This is a general guide, not legal advice. Confirm each step with the Instituto Nacional de Migración (INM) and your Mexican consulate before you rely on it.