When I\'m using the toc: yes command, the document contains \"Content\" as the headline of the table of contents. Due to the fact that I want to write this document
toc: yes
This in your YAML should also work:
header-includes: \renewcommand{\contentsname}{Inhalt}