\documentclass[amssymb,aps,twocolumn,pra,nobibnotes,secnumarabic,prc]{revtex4-2}
\usepackage{tabularx}
\usepackage[labelformat=simple,caption=false]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\usepackage{graphicx
\usepackage{lineno}
\usepackage{dcolumn} % needed for some tables
\usepackage{bm}
\usepackage{amsmath} % for math
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{csquotes}
\usepackage{commath}
\begin{document}
\begin{figure}[htb]
\captionsetup[subfigure]{singlelinecheck=off}
\begin{tabularx}{\linewidth}{*{3}{X}}
\begin{subfigure}[b]{\linewidth}
\label{subfig:a}
\includegraphics[width=\linewidth]{figures/hydro2}
\caption{}
\end{subfigure}
&
\begin{subfigure}[b]{\linewidth}
\caption{}\label{subfig:b}
\includegraphics[width=\linewidth]{figures/hydro1}
\end{subfigure}
\end{tabularx}
\caption{jdjdkkd}
\label{fig:a}
\end{figure}
\end{document}
And i get errors like: Package caption Error: caption undefined. \end{tabularx} Improper \prevdepth. \caption{jdjdkkd}

captionandsubcaptionshould not be used withrevtex4-2. For subfloats, use the oldersubfig, calling it with\usepackage[caption=false]{subfig}; check its manual for the syntax. – egreg Sep 25 '19 at 13:50