If you're in Index Card view or Scene View, go to File > Print;
Mac: From the PDF dropdown menu at the lower left, choose Open in Preview. Apple's Preview application will open and if the resulting PDF is what you want, save it to the desired location on your computer. Or choose Save as PDF to export the file directly without previewing it first.
Windows 11 / 10 only: From the Printer Name dropdown menu, choose Microsoft Print to PDF and click OK.