I'm new to LaTex and I'm trying to create a table with items, but I'm having issues with closing the table borders. When I add "|" to the {tabularx}, I get a new column that I don't want. I tried to follow different LaTex examples, but I'm stuck on how to close my table: My code is
\documentclass{article}
\usepackage{tabularx}
\usepackage{paralist}
\makeatother
\begin{document}
\begin{table}[!b]
\centering
\caption{ Comparison between ST-Kriging, Bayesian inference, and ANNs.}
\label{tab:2}
\renewcommand{\arraystretch}{1.5}
\scriptsize
\begin{tabularx}{\textwidth} {|p{2.3cm}|p{3.5cm}|p{3.5cm}|p{3.5cm}}
\hline
\textbf{} & \textbf{Bayesian Inferences} & \textbf{ST-Kriging} & \textbf{ANNs} \\ \hline
\textbf{Computational Complexity} & NP-hard \cite{ref-satria2020spatial} & $O(N^2)$ & $O(i\times o\times n + n\times o)$ or $O(n \times o \times (i+1))$ for training a single epoch. \cite{ref-taylor1995freeway} \\ \hline
\textbf{Performance Evaluation } & Provides a posterior probability distribution with confidence interval. &
Ensure linear unbiased predictors. & Epoch with the lowest sum of squared error.\\ \hline
\textbf{Weaknesses} & Very computationally intensive due to choosing the proper prior distribution.
&
\begin{compactitem}
\item Missing value causes error in unmatched dimensions.
\item Can not handle large datasets.
\item Require normal distribution.
\end{compactitem}
&
Require intensive data training, and this might lead to an overfitting problem. \\ \hline
\textbf{Strengths }
&
\begin{compactitem}
\item Handle large and small data.
\item Handle missing values.
\item Prior knowledge about uncertain input is not required.
\end{compactitem}
&
\begin{itemize}
\item Handle small data.
\item Computational efficiency.
\end{itemize}
&
\begin{compactitem}
\item Handle big data and small data.
\item Accommodate missing values without a separate estimation step [108]
\item Computational efficiency due to the parallelity feature.
\item Prior knowledge about uncertain input is not required.
\end{compactitem}
\\ \hline
\textbf{Overcoming the Limitation}
&
Use uninformative prior to reduce the computational time, however, it can affect the prediction accuracy negatively.
&
Remove observations that include missing values.
&
\begin{compactitem}
\item Decrease the number of layers of the network.
\item Use iterative methods to stop the training process such as gradient descent.
\end{compactitem}
\\ \hline
\end{tabularx}
\end{table}
\end{document}
The table will look like this:

I believe that the issue is with this line, but I can't find a way to fix it:
\begin{tabularx}{\textwidth} {|p{2.3cm}|p{3.5cm}|p{3.5cm}|p{3.5cm}}
If I add "|" it will create another column instead of closing the table. Any thoughts on what could be the issue? I used "tabular" here instead of "tabularx" and I had no issue, but because I wanted to reduce the space between the list indented text, therefore I had to switch to "tabularx".

