Consider two continuous maps $f: Z \to Y$ and $g: X \to Y$ for (locally finite) CW complexes $X, Y$, and $Z$. I'm interested in knowing conditions, preferably in terms of cohomology, for a lift $h: X \to Z$ of the map $g$ to exist along $f$, i.e., for a continuous map $h: X \to Z$ to exist such that $fh = g$.
I am looking for sufficient conditions for such a lift to exist, but what's more interesting to me are the necessary conditions for such a lift in terms of (co)homology of the spaces/maps involved.
I am aware of (partial) answers in this direction when $f$ is a covering map, a fibration, or a quotient map, but this question is about an arbitrary continuous map $f$. And I have not been able to make progress in this direction or find references. Any help will be appreciated!!!