Ah, an Avengers Infinity quote!
The verb or action implied in the expression "to what end" is whatever verb or action has just been spoken about (or in some cases what is about to be spoken about).
Thus in this quote above, Thanos has just said, "It's frightening, turns the legs to jelly." The phrase "to what end" here then most likely refers back to this previous statement and means, "What is the purpose of being frightened and of your legs turning to jelly?" The phrase is usually meant somewhat rhetorically (that is, the speaker is implying that the answer is already known, namely, there is no point). This is reinforced again by what follows ("Dread it, run from it").
What Thanos means by all of this is to say, "What is the purpose of being frightened by or dreading or trying to run from your destiny? To what end? It will catch up with you eventually no matter what, so you might as well embrace it."
I hope that helps!