Tabularx with \hline and overrightarrow vertical spacing

An alternative with the cellspace package:

enter image description here

\documentclass{article}
\usepackage{cellspace}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}
\begin{document}
\begin{tabularx}{\linewidth}{|Y|SY|Y|}\hline
a & $\overrightarrow{\mathrm{AB}}$ & cdeffg \\\hline
\end{tabularx}
\end{document}

You could use \renewcommand{\arraystretch}{<more space between rows>} (or with the @Zarko'definition stretchering factor), to increase the space of the cells for example.

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
{\renewcommand{\arraystretch}{2}
\begin{tabularx}{\linewidth}{|Y|Y|Y|}\hline
a&$\overrightarrow{\mathrm{AB}}$&c\\\hline
\end{tabularx}}
\end{document}

Another possibilities is to use \makegapedcells from makecell package:

\documentclass{article}
\usepackage{amsmath, amssymb}
\usepackage{makecell, tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}

\begin{document}

{
\setcellgapes{3pt}
\makegapedcells
\begin{tabularx}{\linewidth}{|Y|Y|Y|}\hline
a & $\overrightarrow{\mathrm{AB}}$ & cdeffg \\\hline
\end{tabularx}
}
\end{document}

enter image description here