While I don’t honestly expect my Star Trek fanfiction work to ever see stage or screen, it’s fun to imagine who would ‘play’ a particular character. Furthermore, this can often crystallize ideas about characters. Height, weight, gender, race, age and ethnicity all matter.
I respect canon casting decisions (even if the actor or actress is deceased) and don’t change them, but I may add a child version of a canon character. I also try to match ethnicity as much as possible, and put actors together who are within a reasonable age range. But this is far from an exact science.