Talent, hard work, and connections matter.
Height, maybe, but these actors do well with their short stature:
Hollywood’s 30 great short actors, from Danny De Vito to Daniel Radcliffe
50 celebrities you didn’t realize are really short
Many short actors can play younger roles until they are in their 20’s, so it could be an asset.
Sometimes an actor is miscast because of their box office draw and connections – see I agree with Lee Child – compact Tom Cruise isn’t enough of a Reacher | Alison Flood
And there is this question; Heightism and Success: Why are actors short and presidents tall?
In TV and the movies, camera work and perspective can work wonders with issues of stature.