The "GUI way" of exporting a map to a PDF in QGIS's layout manager is known to be Layout -> Export as PDF ...
.
I wonder if there is any way to do this the CLI way. Either from a python script or the shell. Does anybody know how one would achieve this, especially since QGIS 3.14 added CLI support?