catching with ultra ball is quite hard same with low HP, what is the best poké ball to catch
The best ball to catch a legend would be the Master Ball. If you want to save your Master Ball for legends that are tougher to catch then I suggest using Ultra Balls after you get the legend's HP very low (throwing 20-35 Ultra Balls is hard, but you gotta do it, I did it). You could also try Quick Balls, they are made to be used at the beginning of a battle to easily catch a Pokemon, but it's a lower change with legends but its worth a try. If you're playing Ultra Sun/Moon, use Roto-catch+Ultra Balls. You could also try the Timer Ball, it works the best if you were battling for 10 turns, like suggested by SeeYaLater. If you're having trouble catching a legend like you mentioned in your question, try using Hypnosis or Spore, a sleeping Pokemon is easier to catch.
That's all I can say, I made this answer from my memory. I hope I helped!