It's best to wait till you have a final page count in your preferred page size before designing the cover/spine of your book.
Each printer will have different requirements for...
Margins of internal pages
Page counts (usually factor of 2 or 4 and minimum of 18 pages)
Cover formatting, including a spot for ISBN/barcode on the back
There are a few options for print-on-demand books, with the only upfront cost being you ordering at least one copy of the book yourself.
Probably the most widely used print-on-demand option, and the one adopted by the most online bookstores and physical stores.
Widest distribution (Amazon, Barnes & Noble, Bookshop.org, and many more)
Very customizable print sizing
Generally low cost depending on binding
Decent print quality
Poor support and somewhat glitchy website
Price Calculator: https://myaccount.ingramspark.com/Portal/Tools/PubCompCalculator
Limited to selling on Amazon only, but good quality printing.
Easy to use
Large selection of print sizes
Good print quality
Price Calculator: https://kdp.amazon.com/en_US/royalty-calculator
Note if you are using multiple distributors, set up Amazon KDP first or you may get hit with "ISBN already in use" errors.
https://press.barnesandnoble.com
Limited to selling on Barnes & Noble only.
Large selection of print sizes
Good print quality
Price Calculator: https://press.barnesandnoble.com/print-on-demand
Primarily an eBook distributor, but can also submit to IngramSpark.
Same printing as IngramSpark
Limited print sizing
Better support
Price Calculator: https://draft2digital.com/podcalc
Smaller printer, great quality, but less distribution.
High print quality
Less distribution options
More limited print sizing
Higher cost per book
Price Calculator: https://www.blurb.com/pricing
You can use Blurb to submit to IngramSpark, but note those books are printed by Ingram, not Blurb.
If you want to only sell your books in-person, these are sites we have used personally and have had great results!