How can we determine the tension force's direction?
The pull, which is called tension, is the direction of tension. A thread pulls the mass upwards in the case of a hanging mass, hence the string/rope exerts an upper force on the mass and the tension is on the upper side.