My recommendation would be to create an H-level markdown header with a label, and then refer to that label for automatic cross-referencing, try this:
---
title: "My awesome report"
author: "Me"
output:
bookdown::pdf_document2:
toc: false
number_sections: false
linkcolor: blue
---
# Section
Here is a cool histogram, you can find the code for it [here](#appendix).
The code for this section is found in the [Code Appendix].
```{r chunk1, echo=FALSE}
# Here is some sweet code
hist(rnorm(100))
```
# Code Appendix {#appendix}
```{r ref.label="chunk1", echo=TRUE, eval=FALSE}
```
We labeled the Code Appendix section with a label of #appendix. We can use that to cross-reference that section in our text. You can do that with normal markdown-style linking like: [text shown](#label). You may also just put the full and exact section name in square brackets like: [Code Appendix]. All work.