Morays are hard to keep for a few reasons:
Agressive: they will eat fish they can fit in their mouth or kill easily, and sometimes inverts, vice versa for snowflakes. When hungry enough they will attack nearly any fish, so make sure to feed.
Big: They need lots of water, space to burrow, fairly big amount of food, and can topple corals.
Messy: their slime, messy eating, killing of CUC and movement makes them not ideal for most keepers to have corals with them, both due to params and coral irritation.
Escape artists: they can and will escape your tank if the lid has bigger gaps or is not secure.
they also need 4-5 inches of sand
Morays are tricky, If you are somewhat new to the hobby id recommend waiting and getting more skilled before taking them on