You have to define an export template. This requires some learning, however. If your question is just about formatting the output of your exports, a css solution is the much easier way (and then using the default obsidian pdf export function).
The important css variable here is @media print { }
. You can find a basic stylesheet here, for example - just adapt it to your needs. See also this thread.
You can also work with css classes - this way you can be sure your exported pdf output has exactly the same formatting as your actual note.