Dhimahi interview question

How would you proceed in migrating a legacy project to a new tech stack?