How to change the Rmarkdown Document template?

Thank you, @cderv and @andresrcs.

I am now much closer to a solution that I am happy with. However, I am having difficulties changing the default HTML code at the top of new documents. As far as I can see the top HTML part of a new .Rmd document is not dictated by the document.Rmd template file.

To be more specific, I would like my HTML documents to always include these lines at the top

output: html_document
  html_document:
    code_folding: hide

I can add the lines to a document.Rmd template file, and then delete the abundant code in the new document.
E.g., this code at top of my template document.Rmd file

output: html_document
  html_document:
    code_folding: hide
---

Will produce this output in a new document:

---
title: "Untitled"
author: "author"
date: "9/3/2021"
output: html_document
---

output: html_document
  html_document:
    code_folding: hide
---

I can live with deleting the extra lines, but I would be happy to know if there is a way to avoid it.

Thanks again.