Hi, and welcome to a safe place for beginner questions. R is so vast that I'm constantly finding myself trying to figure out new things.
The basic workflow for a pdf document starts with File | New File | RMarkdown | PDF, which will give you a template and some example text:
title: "PdfTemplate"
author: "Richard Careaga"
date: "10/25/2019"
output: pdf_document
knitr::opts_chunk$set(echo = TRUE)
R Markdown
This is an R Markdown document. ...
To use it, you have to have a \LaTeX environment installed on your host. Google for your platform and you will find tons of guidance on how to do that, such as one from Wellesley
rmarkdown uses pandoc, the Swiss Army knife of format converters to go from your document to the pdf by way of the \LaTeX engine.
The defaults are decent. If, however, you want fine-grained control over the layout, font, appearance, etc., of the final document, you have to take holy orders in LaTeX syntax and features.
It's a substantial investment in time.
With that explainer done, my suggestion for your immediate problem is to knit the initial template to see if you have the same problem. If so, let everyone know. If not, add some of your own material until the strangeness pops up