Overall, I'd say Moonlight.
Scarlet Heart has a bit more momentum than Moonlight, with makes it a bit more engaging. However, that's because there's a lot of poorly-executed transitions, sub-plots that are over almost before they've been introduced, and lots of plot elements & character motivations are unexplained because the general trajectory of the drama follows the original Scarlet Heart, but Ryeo has 20 episodes vs 35, so it doesn't have time to fully deal with everything it wants to cover. Also some things don't make a lot of sense because they're trying to fit a Goryeo succession crisis into a plot written for a a Qing Dynasty succession crisis while changing very little.
OTOH, Moonlight is much more fleshed-out, but occasionally a bit draggy, especially towards the end.
Note also that the original Scarlet Heart is definitely a worthwhile watch, and it might be better to see it before the Korean version. They're different enough that watching both isn't a yawn-fest, and having seen the original will help fill in some of the gaps when you watch Ryeo.
SPOILER: (For the relative happiness of the endings)
----------------------
For a happy ending at the expense of historical accuracy, go with Love in the Moonlight
For historical accuracy at the expense of a happy ending, go with Scarlet Heart
If you're only going to watch one in the near future, I'd say Moonlight. If you're going to watch both fairly soon, maybe go with Scarlet Heart first, then Moonlight to heal your broken heart. Although personally, I couldn't watch any historical dramas for ages after Scarlet Heart, it was so depressing.