Proof (local maximum principle)
Using the mean value property, for all $0<ρ<r$, $$ \begin{align*} |f(a)| ={}& \left|\int_{0}^{1} f(a + ρe^{2πi t}) \d t\right| \\ \leq{} & (1-0) \cdot \sup_{t\in [0,1]} |f(a+ρe^{2πit})| \tag{*}\\ \leq{}& |f(a)|. \end{align*} $$ Therefore $(*)$ is an equality, which means $|f(a+ρe^{2πit})| = |f(a)|$ for all $ρ$ and $t$, i.e. $|f(z)| = |f(a)|$ for all $z\in B(a,r)$.
Since $f$ is holomorphic, $f$ is constant (sheet 1).