If $f(0) = 0$ and $|f'(x)|\leq |f(x)|$ for all $x\in\mathbb{R}$ then $f\equiv 0$

Consider $S := \{ x \in \mathbb{R} : f(x) = 0 \}$. This set is closed by the continuity of $f$. We now claim $S$ is also open. To show this, suppose $x_0 \in S$, and let $A := \sup \{ |f(x)| : x \in (x_0 - \frac{1}{2}, x_0 + \frac{1}{2}) \}$. Then, for $x \in (x_0 - \frac{1}{2}, x_0 + \frac{1}{2})$, we have $f(x) = \int_{x_0}^x f'(t)\,dt$, and $|f'(t)| \le |f(t)| \le A$ for $t$ between $x$ and $x_0$, so $|f(x)| \le |x - x_0| A \le \frac{1}{2} A$. Thus, by the definition of $A$ as a supremum, $0 \le A \le \frac{1}{2} A$, which implies $A = 0$. This implies that $f(x) \equiv 0$ for $x \in (x_0 - \frac{1}{2}, x_0 + \frac{1}{2})$, establishing that $S$ is a neighborhood of $x_0$.

Now, we have shown that $S$ is a clopen subset of $\mathbb{R}$, and we are given that $0 \in S$ so in particular, $S$ is nonempty. By the connectedness of $\mathbb{R}$, this implies $S$ is all of $\mathbb{R}$, which is equivalent to the desired conclusion.