You can add a caption to a table by wrapping the tabular environment in a table environment:

\begin{table}
\begin{tabular}
...
\end{tabular}
\caption{\label{tab:table-name}Your caption.}
\end{table}

Note that the table environment will also let the figure 'float' to where LaTeX thinks it should go. If you want more control over figure placement, you can use placement specifiers as described in this section of the LaTeX Wikibook.

[edit] Overleaf guides

[edit] LaTeX Basics

[edit] Mathematics

[edit] Figures and tables

[edit] References and Citations

[edit] Languages

[edit] Document structure

[edit] Formatting

[edit] Fonts

[edit] Presentations

[edit] Commands

[edit] Field specific

[edit] Class files