If you want to enter LaTeX code and have it rendered, you can either used the built-in minimal LaTeX installation (TinyTeX and scontents, pgfplots packages) or install the texlive extension (which takes more than 7 GB of disk space):
flatpak install flathub org.freedesktop.Sdk.Extension.texlive//23.08
Templates are available, although they are a bit hidden:
/var/lib/flatpak/app/com.github.xournalpp.xournalpp/current/active/files/share/xournalpp/resources/default_template.tex
Optionally, you can download an additional copy right from here:
https://raw.githubusercontent.com/xournalpp/xournalpp/master/resources/default_template.tex