The reactivity of compound Z with different halogens under appropriate conditions is given below :

The observed pattern of electrophilic substitution can be explained by
Know your College Admission Chances Based on your Rank/Percentile, Category and Home State.
Get your JEE Main Personalised Report with Top Predicted Colleges in JoSA

OH is strong activating +M group, so substitution of electrophile take place o/p to OH group and in substitution stearic hindrance of tert-butyl and Halogen also plays a role