This is a difficult question to answer definitively because there are so many factors that contribute to an actor's interpretation of a role. However, it is safe to say that an actor's physical appearance can play a significant role in how they are able to bring a character to life.
For example, if an actor has the physical appearance of the character they are portraying, they may be able to more easily convey the emotions and characteristics of that individual. This is because they can physically understand and empathize with the character on a more personal level. Additionally, an actor's physical appearance can also help to create a certain atmosphere or mood for the production.
If an actor playing Hamlet is tall and dark-haired, this may create a more brooding and ominous feeling onstage. An actor who is physically imposing may be more likely to be cast as the Ghost of Hamlet's father, as their physicality can convey the sense of power and authority that the character possesses. Conversely, if an actor playing Hamlet is shorter and fair-haired, this may give the character a more youthful and innocent appearance, and an actor with a more youthful appearance may be better suited to the role of Hamlet himself, as the character is often depicted as being young and idealistic. Ultimately, it is up to the director to decide how an actor's physical appearance should be used in order to create the most effective production possible.
Of course, the actor's physical appearance is only one aspect of their performance and should not be the sole determining factor. However, it is certainly something that can affect an actor's interpretation of the role and should be considered when casting Hamlet.