Your image can be simple reproduced by expand of code in the question given link to desired number of columns and rows. Using tabularray and adjustbox packages the table code is simple and short:
\documentclass{article}
\usepackage{geometry} % for set up page layout
\usepackage{tabularray}
\UseTblrLibrary{counter,varwidth} % <===
\usepackage[skip=0.33\baselineskip]{subcaption}
\usepackage[export]{adjustbox} % <---
\begin{document}
\begin{figure}[ht!]
\adjustboxset{width=\linewidth,
valign=m
}
\begin{tblr}{vline{5,8} = {1-5}{solid},
colsep=2pt,
colspec = {@{} r *{9}{X[c]} @{}},
measure = vbox,
hspan = minimal,
}
& coll 1 & coll 2 & coll 3
& coll 1 & coll 2 & coll 3
& coll 1 & coll 2 & coll 3 \
A 1 & \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
\
& val a11 & val a12 & val a13
& val b11 & val b12 & val b13
& val c11 & val c12 & val c13 \
A 2 & \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
& \adjincludegraphics{example-image-duck}
\
& val a21 & val a22 & val a23
& val b21 & val b22 & val b23
& val c21 & val c22 & val c23 \
& \SetCell[c=3]{c} \subcaption{x} & &
& \SetCell[c=3]{c} \subcaption{xx} & &
& \SetCell[c=3]{c} \subcaption{xxx} & & \
\end{tblr}
\caption{Two rows of graphs}
\label{fig:fig1}
\end{figure}
\end{document}

\captionhas to go into a paragraph type column. – John Kormylo Sep 04 '22 at 14:10