Assertion:
If $D$ is an effective divisor of degree $d\geq 1$ on a smooth projective curve $C$ of genus $g\geq 1$, then $l(D)\leq d$.
The proof is by induction on $d$:
Initial step d=1
If $d=1$, then $D=1. P$ for some $P\in C$ and $L(1.P)=k$ (= base field) so that the assertion is true. [Here we have used that $g\geq 1$, i.e. that $C$ is not isomorphic to $\mathbb P^1$]
Inductive step $d-1\to d$
Choose some $P\in \operatorname {supp} D$ and consider the exact sequence of $k$-vector spaces $$0\to L(D-P)\to L(D)\to k$$ It immediately implies $l(D)\leq l(D-P)+1\leq (d-1)+1=d$
The assertion, which is much stronger than what you ask about, is thus proved.
Note carefully that this proof is from first principles and does definitely not involve grandiose concepts like Riemann-Roch, sheaf cohomology or Serre duality...