He is not the best legendary, but depending on the account, he may very well help you. Build with high HP, as it is your main stat. I am assuming you are an earlier player. No Attack, and Defense is good but HP is better. C. RATE and C. DMG can alsk be used if you want him as a nuker, though im pretty sure by the reviews he doesnt do that job very well. So HP, SPD, RES, ACC, and DEF is the way to go for utility. Put him in whatever sets you need to complete stats, as well as things like Immortal, Swift Parry, Regen, and Lifesteal to increase utility. For masteries unless you are a very endgame player, i would say you should go down the classic Offense/Support section, mostly going down the right side of Offense to Warmaster and the left side of Support for Cycle of Magic and Lore of Steel.
I use Ayumilove as a ROUGH GUIDE ,,, BUT, compare it off Hellhades too
https://ayumilove.net/raid-shadow-legends-samar-gemcursed-skill-mastery-equip-guide/