1) Work for 6 months in Russia as a specialist if your occupation is included into the list and get permanent residence.
If you are working in Russia officially for more than 6 months as a specialist and your occupation is included into the list of "required professions" you can apply for permanent residence and later for citizenship.
The list of 135 professions includes doctors, nurses, midwives, medical laboratory technicians, veterinaries, therapists, engineers, mathematicians, certain managers, and directors. (see annex 1 for list in the end of this post).
You will need simple work visa to start with.
2) Become highly qualified specialist (HQS) and get permanent residence.
If you who are working in Russia as highly qualified specialist (and have so called HQS working visa) you can apply for permanent residence together with your family members.
To start you will need HQS visa. Minimum requirement to obtain it – employer who will hire you and pay at least 160 000 rubles (~2150 USD) a month as a salary. For some medical workers and teachers minimum salary requirements are less. Downside: permanent residence will be cancelled if work permit expires, so you will need to apply for citizenship while still working to maintain your residence in Russia.
3) Graduate from Russian university with honors and get permanent residence.
If you graduate from Russian state-licensed university or academy and obtain higher education degree with honors, you can apply for permanent residence. No strings attached.
You will need educational visa to start with.
4) Get employed by Russian army and get temporary residence.
Foreign national who is employed by Russian army can obtain temporary residence permit for period of the employment (military service). I have no idea what you should start with for this option.
5) Try Russian version of "green-card lottery" or quota-based application for temporary residence.
Every year Russian government announces number of foreign nationals who can apply for residence in Russia without any specific requirements (it's called "quota"). This number is quite small, for example, in 2021 only 2000 people would be allowed to apply for residence in Moscow. For other regions, this number is even less.
Specific people who can apply for residence are selected by migration committee every year. They are reviewing applications of all foreigners and choosing those who will have best chances to integrate into Russian society, based on education level, work experience, family background, age, property and etc.
Needless to say, selection procedure is not always honest and there are no specific selection criteria, so there is no way to be sure in positive outcome.
To participate in this selection, you need to apply personally in Russia and provide basic documents (passport, registration, migration card). When you win you will be allowed to apply for temporary residence in Russia.
To start you need to be legally in Russia.
PS: There are some plans to introduce residence for investments program, but details are not yet available.