The trick is, you don't care how you set up anything. Seriously, you just don't care. Your prospective publishers, on their web sites, will have links to a web page or downloadable document that might go by the name "Style Guide" or "Submission Guidelines." That guideline is how you set up your offering, because the PUBLISHERS care. You don't care - but they DO.
Strictly observe those publisher's guidelines. Submit a "clean" document. Try to avoid leaving in any grammatical and technical errors. Since I'm an author of sword-and-sorcery stories, the technical side is just to be self-consistent with what your magic can and can't do. If doing a space-opera, try to not infringe too deeply on the laws of physics. Make your star travel believable. If doing a technical book, make no mistakes and try to make your examples sound like real-world situations.
When I most recently submitted one of my stories, the prospective publisher required PDF delivery derived from a document in Courier New font and 12 point size. They didn't specify and apparently didn't care whether I originally used Word, Word Perfect, WordStar, LibreOffice, or Egyptian heiroglyphs. My original was Word with Bookman Old Style font at 12 point. So I made a quick switch - one the more useful aspects of the "Styles" feature in Word. They actually accepted my novel but then blindsided me. They originally denied they were a vanity press, but in their acceptance response they said that authors were expected to share in the publishing costs; in their particular case, US$ 2500, give or take a few. When it swims like a duck, walks like a duck, talks like a duck, , .... quack,
Vanity publishers have limited advertising & distribution support staff and are oriented towards folks who just expect to give out copies to their friends and family. I.e. they are for either niche markets or a purely self-aggrandizing project. During my grad-school days, one of my major professors vanity-published a chemistry book - which he then required as the textbook for the course. He was unscrupulous in other ways, but as noted for Julius Caesar, ...
nihil nisi bonum de mortibus. I.e. (Say) nothing but good of the dead.
If I wanted to publish a vanity book, I would have sprung for it. But I think my novels have at least some commercial potential, so I don't want to go the vanity press route quite yet. There are publishers who will web-publish your work and will even manage the royalties for you - for a price. Amazon publishes through Kindle Direct Publishing. In this link below from Reddit, there is some disagreement but in general there are more down sides than up sides to use Amazon's KDP service. I don't doubt that some scrupulous publishers exist. I hope I can find one.