the 4f electrons are well localised in Lanthanides. they do not involve in bond formation. what would happen to the properties of Lanthanides, if the 4f electrons were delocalised? will they still show magnetic ordering? if so, how?
localization vs. delocalization, moment formation and magnetic order are related but not 1 to 1.
The view that the 4f's in the Lanthanides do not participate at all in bonding is not most up to date, while of course practical for qualitative reasoning. For details check e.g. the "crystal field Handbook" by Ng and coauthor (s). [yes, the spelling " Ng " is correct]
Check the properties of the Actinides (5f) for less localized f-electrons.
Moreover, for heavy atoms/ions, the spin-orbital coupling may also play am important role to determine the magnetism, e.g. for the compounds containing 5f orbitals.