In your yaml you specify pdf_document first.
If I remember correctly this means that an pdf document will be produced when you press the knit-button.
The process of creating a pdf document is a little more involved than creating a html document.
Therefore start with removing the line with pdf_document and try to knit.
If that works fine and produces a html document you will know that your .Rmd file is okay. If the knit fails again let us know and mention the messages you see in the Render panel.
If everything is fine until then, then insert the line that you removed and try again.
And again let us know which messages appear in the Render panel in case of a failure.
If you never before created a pdf file on your current computer, it could be that a LaTeX compiler was not yet installed on that computer. In that case try using the tinytex package that can help you to install one.
Note that installing tinytex is not sufficient : use the function tinytex::install_tinytexto actually install the LaTeX compiler TinyTeX, a custom LaTeX distribution based on TeX Live.