Before you spend a lot of time on formatting, contact a publisher or two and see if they want to work with you and publish your book. If they are excited enough then they will sign you up. You normally talk to an acquisitions editor at this stage.
But each publisher may have different preferred ways of working with your manuscript and it can affect how you work and the tools you use.
For the content of the book, work with whatever tools you prefer, but as you get closer to publication, the publisher will want its own formats.
Normally, for a textbook, you will be assigned an editor (in the sense of one who edits - a content editor). They will make suggestions about your wording and such. You will need to work with this person, using some mutually acceptable set of tools. It might be Word or something else. If LaTex is required, they might do that formatting themselves, and if not, will probably provide a required template for you to use. Even if they prefer Word, they will most likely have a template for you. Perhaps a required template.
You will have only limited control over placement of figures and other such things, and only limited control over layout. But the publisher will somehow prepare the manuscript for printing using its own preferred layouts: margins and such. They may even want you to use, or avoid, certain fonts.
I think that very few publishers will just print a photocopy of your manuscript. There is some processing done before production. So, don't obsess over formatting until you are working with a publisher.
Some publishers will want separate files for any figures (or even for chapters). High resolution images. Others will prefer to create the image files themselves. You may need permissions for any figures (or photos) that you don't create yourself. If the permissions need to be paid for then that may be your responsibility, or you may be given a budget by the publisher for that.
Once the manuscript is reasonably complete the acquisitions editor (or a representative) will probably send your manuscript out for review to a few people they trust. You will get suggestions for improvement of the text, possibly a lot. Especially for a first time author. Your book could get rejected at this point, but I think that is very unlikely. But you will be expected to respond appropriately to all suggestions, usually by modifying the text. This stage can be maddening for a first time author and there may be several rounds of review.
Once they have a printable version, they will send you galley proofs for your approval. These might just be pdf files and you can usually make minor edits, but a lot of money has been spent at this point, so too many changes will be problematic. But your prior work with the content editor should make this moot.
They will try to accommodate you, but you need to work with them as well.