I am trying to understand the correspondence between complex line bundles on $B$ and homotopy classes of maps $[B , BU(1)]$.
One direction I can do. That is, if we have a map $f: B \to BU(1)$, we can construct a line bundle as the pullback of the universal line bundle $EU(1) \times _{U(1)} \mathbb{C} \to BU(1)$ along $f$.
However, I can't find a source on how to go the other way around. That is, if we have a complex line bundle $E \to B$, how do we get a (homotopy class of) map(s) $B \to BU(1)$?
Equivalently, we need a circle principal bundle on $B$. The best way I can think of doing this is "removing" the zeroes from $E$, quotienting by the action of $\mathbb{R}^{>0}$ and then we get a $U(1)$-principal bundle on $B$, but I am not sure about this since I feel like we are losing information by removing the zeroes and quotienting.