Unable to knit to pdf

I am unable to knit a document to a pdf. Knitting to word/HTML works fine. Using the default Rmarkdown template and Knitting to pdf produces an error

|................................................... | 86% [pressure]

processing file: Untitled.Rmd

/usr/local/bin/pandoc +RTS -K512m -RTS Untitled.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Untitled.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable 'geometry:margin=1in'
output file: Untitled.knit.md

tlmgr: package repository Index of /tex-archive/systems/texlive/tlnet (verified)
tlmgr install: package already present: l3backend
tlmgr install: package already present: l3backend-dev
! Undefined control sequence.
l.140 \pandocbounded
{\includegraphics[keepaspectratio]{Untitled_files/figure...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Error: LaTeX failed to compile Untitled.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See Untitled.log for more info.
Execution halted

OS: Mac os Sequoia 15.4
Tex version: TeX 3.141592653

It seems you have something that looks like a control sequence to LaTex but is undefined. Can you knit a very simple document with only plain text, no math or figures or tables?

What is the content surrounding the quoted {\includegraphics[keepaspectratio]{Untitled_files/figure...?