\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.18}
\usetikzlibrary{patterns.meta}

\begin{document}

\begin{tikzpicture}
\pgfplotstableread{
  kraj    złoto srebro brąz
  Czechy  3     0      2
  Litwa   0     2      2
  Polska  1     4      5
  Ukraina 3     5      4
  Węgry   6     7      6
}\mydata

\begin{axis}[
  xbar stacked,
  xtick distance=1,
  xmajorgrids=true,
  major tick length=0pt,
  xmin=0,
  xticklabel=\empty,
  yticklabel style={font=\small},
  bar width=8pt,
  ytick=data,
  yticklabels from table={\mydata}{kraj},
  legend entries={złote, srebrne, brązowe},
  legend pos=south east,
  legend cell align=left,
  legend style={font=\scriptsize},
  width=8.4cm,
  height=5.5cm,
]
\addplot[draw=none, fill=black!40] table[x=złoto, y expr=\coordindex] 
  {\mydata};
\addplot[draw=none, fill=black!20] table[x=srebro, y expr=\coordindex] 
  {\mydata};
\addplot[draw=none, fill=black!70] table[x=brąz, y expr=\coordindex] 
  {\mydata};
\end{axis}
\end{tikzpicture}

\end{document}