In cases where you intend to hang a heavy object on a wall, yes, you want to drill into a wood stud. Drilling into a stud and using heavy-duty fasteners will ensure that the object is mounted securely.