If $A^m=0$, then the minimal polynomial of $A$ divides $x^m$. The minimal polynomial has degree at most $n$ by Cayley-Hamilton.
Here is an alternative approach that doesn't rely on knowing anything about minimal polynomials, or Cayley-Hamilton. Consider $A$ as a linear transformation on $K^n$ if $K$ is your base field. Let $M_1$ be the range of $A$, i.e., $M_1=A(K^n)=\{Av:v\in K^n\}$. For $j>1$ let $M_{j}=A(M_{j-1})$ be the image of $M_{j-1}$ under $A$. In other words, $M_j=A^j(K^n)$, and we can include $M_0=K^n$ for convenience. Note that each $M_j$ is a subspace and $M_j\subseteq M_{j-1}$ for all $j$.
We know that $A^m=0$, so $M_m=\{0\}$. If for some $j$, $M_j=M_{j-1}$, then $M_{j+1}=AM_{j}=AM_{j-1}=M_j$, so $M_{j-1}=M_j=M_{j+1}=M_{j+2}=\cdots$. It follows that $M_j$ must be $\{0\}$ in such cases. This implies that all of the containments are proper until you get to $\{0\}$, so there is an $m_0$ such that $\{0\}=M_{m_0}\subsetneq M_{m_0-1}\subsetneq\cdots\subsetneq M_2\subsetneq M_1\subsetneq K^n$. Since there are $m_0$ proper containments of subspaces and $K^n$ is $n$ dimensional, this implies that $m_0\leq n$. Since $M_{m_0}=\{0\}$ and $M_{m_0}$ is the range of $A^{m_0}$, it follows that $A^{m_0}=0$, and finally $A^n=A^{m_0}A^{n-m_0}=0$.