Rare-earth elements (REEs) form in wide varieties of environments, and accordingly in a wide spectrum of physicochemical conditions that control petrogenesis and concentration of associated ore deposits.
You can have a look at several textbook about this interesting subject, but based on exploration guides, they are assorted as follows:
1) In A-type granites and related pegmatites, and REEs in this case are associated with possible economic concentrations of rare and strategic metals such as Nb, Ta, W, Sn, B, Be, Li, Y, U, Th and others.
2) In alkaline igneous complexes.
3) In igneous phosphates, and nelsonite ores rich in apatite and hosted by gabbros.
4) In sedimentary phosphate deposits (phosphorites).
5) In placer REEs ore minerals. for example in stream sediments and in black sand on the beaches. REEs ore minerals in them are considerable such as monazite, allanite, xnotime and more.