NaF is more ionic than MgF2. The Na+ ion is larger than the Mg2+ ion, and it also has the lower charge. The anion (F−) is common in both the compounds. So, in terms of Fajan's rules, NaF should be more ionic between the two and hence formed more easily.