For a more general markdown compile workflow, I made a pandoc filter that allows you to choose to create indexes for DOCX / ODT / Typst PDF or LaTeX PDF from the same Scrivener project; read through this thread (for some other options too):
And a sample Scrivener project: https://forum.literatureandlatte.com/uploads/short-url/qdKQUdYCySa0QjryrvAFYqsMMs9.zip
The advantage is you don’t only depend on a LaTeX toolset (LaTeX is extremely powerful typesetter, but a large install and a complex tool for those without experience). The disadvantage is the markdown workflow is mostly tested on macOS, and Windows terminal tools are set up a little differently.