To help close this question, I put together an MWE to show the differences between sectioning commands (\section and \subsection) and frame titles.
Also how to make a document, class article, (article mode) from a beamer presentation (presentation mode), hiding some frames.
Compiling the code will produce a beamer presentation of 6 frames (F1 to F6): the title (F1), the Overview (F2) showing the structure of sections and subsections using \tableofcontents (but not the list of frames!) and 4 additional frames with content.
The tikz figure is in the frame F4 Connections under the subsection Description.
The code is in beamer mode. Note that the \section and \subsection commands are used outside of the frame environment.
To switch to article mode comment \documentclass{beamer} and uncomment both
\documentclass{article} and \usepackage{beamerarticle}.
Frame #5 was marked as \mode <presentation> so it will show in mode presentation, but not in mode article.
The result is a three-page article: a title page, the table of contents showing sections and subsections with the title used in the F2 Overview frame, and pages with the content, where the frame titles appear as \paragraph because for each frame issues a \paragraph*{<frame title>}.
Frame #5 does not appear under section 2, as expected.
Note that the \newpage and \bigskip commands, useful in article mode, had no effect in presentation mode.
To produce a list of frames in beamer mode see https://tex.stackexchange.com/a/56541/161015
Structure of the presentation

Beamer frame #2 using \tableofcontents

Beamer frame #4, the tikz figure

Article mode, table of contents

Article mode, the contents

% !TeX TS-program = pdflatex
\documentclass{beamer} %Un-comment to produce a presentation
%\documentclass{article} %Comment to produce a presentation
%\usepackage{beamerarticle} %Comment to produce a presentation
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{tikz}
\usepackage{graphicx} % for logo
\usetheme{Madrid}
\usecolortheme{beaver}
\renewcommand{\contentsname}{} % use the frame name
\begin{document}
\author{The author name}
\title{F1 Beamer template}
\logo{\includegraphics[height=0.8cm]{example-grid-100x100pt}}
% \setbeamertemplate{navigation symbols}{} % hide navigation symbols
\begin{frame}[plain] % cover F1
\maketitle
\newpage % works only in article mode
\end{frame}
\begin{frame}
\frametitle{F2 Overview} % Table of contents slide
\tableofcontents % Throughout your presentation, if you choose to use \section{} and \subsection{} commands, these will automatically be printed on this slide as an overview of your presentation
\newpage % works only in article mode
\end{frame}
\section{Section 1}
\begin{frame}{F3 in Section 1}
\bigskip% for article mode
As any dedicated reader can clearly see, the Ideal of
practical reason is a representation of, as far as I know, the things
in themselves; as I have shown elsewhere, the phenomena should only be
used as a canon for our understanding.
\end{frame}
\subsection{Description}
\begin{frame}{F4 Connections}
\centering
\bigskip% for article mode
\begin{tikzpicture}[
dot/.style={circle,fill, inner sep=1.5pt, outer sep=0pt},
every label/.style={inner sep=0pt}]
\newdimen\R \R=1cm
\foreach \i [count=\j] in { 1,2,3,4,5,6}
{\node (n\j) [dot, label=60\j:$\i$] at (60\j:\R) {};
\draw[blue,thick] (0,0) -- (n\j);
}
{\foreach \i in {1,2,...,6}
\foreach \j in {\i,...,6}
\draw (n\i) -- (n\j);
}
\end{tikzpicture}
\end{frame}
\section{Section 2}
\mode<presentation>{ % % Only shown in presentation,
\begin{frame}{F5 in Section 2}
Shown only in mode presentation.
\end{frame}
}
\begin{frame}{F6 in Section 2}
\bigskip % for article mode
As I have shown elsewhere, Aristotle tells
us that the objects in space and time, in the full sense of these
terms, would be falsified.
\end{frame}
\end{document}
\documentclass{beamer} \usepackage{tikz} \begin{document} <your code> \end{document}I get a PDF with two slides, the first one has a table of contents, the second your diagram. Which is exactly what one would expect. What did you expect, and what do you get? – Torbjørn T. May 03 '21 at 21:34beamerworks.\sectionand\subsectionare actually supposed to be added outsideframeenvironments, and they don't add text to the presentation. If you want a title for the frame, use\frametitle{foo}after\begin{frame}. – Torbjørn T. May 03 '21 at 21:42\section/\subsectionwon't be shown in the slides (except for the ToC), but there's nothing stopping you from writing normal text. – Torbjørn T. May 03 '21 at 21:46