Shulchan Arukh, Orach Chayim Siman 41
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
הנושא משאוי על ראשו חולץ תפילין של ראש עד שיסיר המשאוי ואפי' מטפחת אסור להניח על הראש שיש בו תפילין אבל דבר שדרכו ליתן בראשו כגון כובע או מצנפת מותר: הגה ואפילו הכי אם הוא משאוי כבד ד' קבין והתפילין נדחקות צריך להסירן (ב"י):
One who is carrying a load on his head should remove his head תפילין until he removes the load. And even a cloth is forbidden to place over one's head when he has his תפילין on. But something which is usually placed on the head, like a hat or a turban is permitted. Rema: Nevertheless, if the load is [as] heavy [as] four kav's and the תפילין are pushed [because of it], you are required to remove them (Beit Yosef).