Please check my below proof. My proof is somewhere messy since I don't know how to organize and present ideas efficiently. I'm happy to receive any suggestion to have a shorter, more concise, and more elegant proof :)
Theorem:
Suppose that $A$ is finite and that $f:A \to B$ is surjective. Then $B$ is finite and $\vert{B}\vert \leq \vert{A}\vert$, the equality holds $\iff f$ is bijective.
Proof:
$A$ is finite $\implies$ there exists a bijection $t:I_n \to A$ where $I_n$ is an initial segment of $\mathbb{N}$.
$\implies f\circ t:I_n \to B$ is a surjection.
Let $g:B \to I_n$ s.t $g(b)=\min(f\circ t)^{-1} \{b\}$.
If $g(b)=g(c)$, then $\min(f\circ t)^{-1} \{b\}=\min(f\circ t)^{-1} \{c\}$. This implies there exists $m$ s.t $f\circ t (m)=b$ and $f\circ t (m)=c$. Thus $b=c$. So $g$ is injective.
$\implies g:B \to g[B]$ is bijective. $g[B] \subseteq I_n \implies$ g[B] is finite.
As a result, $B$ is finite.
$g[B] \subseteq I_n \implies \vert{B}\vert \leq \vert{I_n}\vert=\vert{A}\vert \implies \vert{B}\vert \leq \vert{A}\vert$. The equality holds $\iff g[B] = I_n \iff g:B \to I_n$ is bijective.
Now we prove ($g:B \to I_n$ is bijective) $\iff (f$ is bijective). It is easy to show that $(g:B \to I_n$ is bijective) $\Leftarrow (f$ is bijective). So our task is to prove $(g:B \to I_n$ is bijective) $\implies (f$ is bijective).
Assume that $f(a_1)=f(a_2)=b$. Then $\exists x_1,x_2 \in I_n$ s.t $f \circ t(x_1)=f \circ t(x_2)=b \implies x_1,x_2 \in \{m \in \mathbb{N} \mid f\circ t (m)=b\}$.
Assume $x_1 \neq x_2$. Without loss for generality, we assume $x_1 < x_2$. This implies $x_2 \neq \min(f\circ t)^{-1} \{b\} \implies \not \exists b \in B$ s.t $g(b)=x_2 \implies g$ is not surjective (CONTRADICTION).
Thus $x_1=x_2$ or equivelently $a_1=a_2$.
To sum up, $f(a_1)=f(a_2)=b \implies a_1=a_2$. As a result, $f$ is injective $\implies f$ is bijective.