In this example tabular environment works fine, but tabularx produces an error.
\documentclass{book}
\usepackage{tabularx}
\begin{document}
\begin{tabular}{l l}
\verb@{@ & cell2 \
\end{tabular}
\begin{tabularx}{\textwidth}{lX lX}
\verb@{@ & cell2 \
\end{tabularx}
\end{document}
The error is
File ended while scanning use of \TX@get@body.
\texttt{\{}– David Carlisle Jan 10 '21 at 01:19\begin{tabularx}{\textwidth}{lX}\verb@\0@\end{tabularx}? – Yola Jan 10 '21 at 01:24