I have two proofs on "if $\phi: G \rightarrow H$ is a homomorphism, then $\phi(1_G) = 1_H$".
The first one is the one in the lecture notes:
Let $\phi(1_G) = h$. Then $1_Hh = h = \phi(1_G) = \phi(1_G1_G) = hh$. So $h = 1_H$.
Which is fine. Here is my proof, which is a copy of a proof for isomorphisms:
By definition, $1_Gg = g = g1_G$. Then $\phi(1_Gg) = \phi(g) = \phi(g1_G) \implies \phi(1_g)\phi(g) = \phi(g) = \phi(g)\phi(1_G) \implies \phi(1_G) = 1_H$, by definition.
Which is fine if $\phi$ is an isomorphism. But I feel that this is wrong in the case that $\phi$ is a homomorphism since we do not have bijectivity, so we cannot assume that for all $h \in H$ there exists a $g \in G$ such that $\phi(g) = h$.
Am I correct in thinking this? Also, is it okay to use the proof for homomorphisms for the isomorphism case?
The second proof is correct, but not for the reason you state.
It is incorrect to conclude that $\phi(1_G) = 1_H$ because $\phi(1_G)$ satisfies the definition for $1_H$. For that, you need $\phi(1_G)h = h\phi(1_G) = h$ for all $h\in H$, which as you and Ennar noted, requires surjectivity.
However, as Tobias mentions in the comments, by the virtue of the fact that you have $\phi(1_G)\phi(g) = \phi(g)$, that is enough to finish the proof. Since we are working with groups, we know that $\phi(g)$ is invertible. Then we have $$\phi(1_G) = \phi(1_G)1_H = \phi(1_G)\phi(g)\phi(g)^{-1} = \phi(g)\phi(g)^{-1} = 1_H.$$