I can’t remember the source, but supposedly, the hideout was equipped with a fiber optic cable and a satellite dish, which was vislble in several of the pics we have seen.
IOW, UBL had comms with the outside world.
They tracked him down by the address on his DirecTV bill?
Of course he probably used an alias like Osama bin Smith.