Some LED headlight bulbs have cooling bits on the back that take up more room than you may have. My current bulbs have cooling fins on the back end and I use a hole saw on the back of the headlight recess and bonded in a cup to create space for the fins.
The brighter bulbs I am about to install have little fans.
I went with LED headlight partly because I wouldn't have to mess with bigger wires or relays.