First, please do format your code correctly. That will be easier to read:
FAQ: How to Format R Markdown Source
With Quarto you can include some external .qmd content this way: Quarto - Includes
Otherwise, you need to consider knitr feature with child document. We share an example and links to some docs at: Create tabsets panel from R code
This is to dynamically create tabset but you should be able to adapt to your usage.
Hope it helps