\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\title{Ein Titel}
\begin{document}
    \maketitle
    \tableofcontents
    \input{abschnitt1.tex}
    \input{abschnitt2.tex}
\end{document}