You haven't exactly give some detailed specs, so here just a general idea.
\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}% for dummy text
\makeatletter
\newenvironment{foobox}[1]{%
\setbox0=\hbox{\space\ignorespaces\strut#1\unskip\space}%
\setbox1=\hbox\bgroup\minipage[b]{.9\linewidth}%
}{%
\endminipage\egroup
\dimen@\dimexpr\wd0+2em\relax
\ifdim\dimen@<\ht1\dimen@\ht1\fi
\par\medskip\noindent
\hbox to .1\linewidth{%
\m@th
\hfil$
\vcenter to \dimen@{\leaders\vrule\vfill\hbox{\kern\dimexpr.5ex-\ht0\relax\rotatebox{90}{\box0}}\leaders\vrule\vfill}
$\hfil
}%
$\m@th\vcenter{\box1}$%
\par\medskip\noindent
\ignorespacesafterend
}
\makeatother
\begin{document}
\lipsum[66]
\begin{foobox}{2021}
Bla bla bla
\end{foobox}
\lipsum[75]
\begin{foobox}{Whatever}
Some text here
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
and some text there
\end{foobox}
or an example with only a list
\begin{foobox}{A}
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
\end{foobox}
\end{document}
The construct is not breakable across pages. The minimal height is given by the width of the "label" plus two spaces plus a line of 1em on each side.

framedpackage provides a way (leftbar) to draw a vertical line beside its content, however the picture you post shows that the line is much longer than the text. How should the line length be determined? – campa Jul 27 '21 at 07:54